Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

type mismatch and recordset

Status
Not open for further replies.

sixtyseconds

Programmer
Oct 24, 2001
1
0
0
US
Hi,
I created an application that queries a ms sql server 6.5 and got it to work on the machine on which the server resides. But when I installed the program on another computer I got the "runtime error '13' type mismatch". I narrowed the problem down to the retrieving of the rows to a recordset.

For example...

Private Sub Command1_Click()
Dim dbAddress As New ADODB.Connection
Dim rsAddress As New ADODB.Recordset

Dim sql As String

dbAddress.Open "dsn=test;uid=sa;pwd=abc123def"

sql = "select * from final_table"

Set rsAddress = dbAddress.Execute(sql) <-- THIS IS WHERE THE ERROR OCCURS

dbAddress.Close

End Sub


ALSO... If I replace the sql query to &quot;select * INTO final_table_tmp from final_table&quot; I do not get the error.

P.S.
Does anyone know how I can check whether my computer has ADO installed? Thanks in advance

G. Rush
 
Try leaving off the 'As New ADODB.Recordset&quot; part of the DIM statement, ie just put DIM rsAddress.

This worked for me when I had a similar problem a while back !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top