-
When I run this query I get back rs.AbsolutePosition = -1 and I know I have records in there. I am Running VB5 and SQL Server 7.0
Dim cn As New ADODB.Connection
Dim cm As New ADODB.Command
Dim rs As New ADODB.Recordset
cn.Open "provider=SQLOLEDB.1;" & _
"Password=;" & _
"Persist Security Info=False;" & _
"User Id=sa;" & _
"Initial Catalog=TPO;" & _
"Data Source=SLC-CUSTSQL"
cm.ActiveConnection = cn
cm.CommandText = ("SELECT D_Import FROM tImport")
Set rs = cm.Execute
Thanks
-
Execute method is only for Action-Queries.
Your SQL is not action type so you should use:
rs.Open .....<the rest of parameters>