Runtime error 3001 using ADO
Posted on 1998-12-15
I wrote an client application that uses ADODB to access a database on SQL-SERVER. For limiting the number of connections I wrote also an activex exe that will serve a adodb.connection object. This works! In my client I uses the folowing code to set the Connection object :
Dim Cn as new ADODB.Connection
Set Cn = MyObjStore.GetConnection
MyObjeStore is the ActiveX class I wrote and GetConnection is a property of that.
Now when I try to open a resultset using the folowing code I receive an error :
Dim rstTemp as new ADODB.RecordSet
Rst.Open "SELECT * FROM orders",Cn
When I try this I receive the error : Runtime error 3001 The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one other.
But when I open the recordset using :
Dim RstTemp as ADODB.recordset
Set RstTemp = Cn.Execute ("SELECT * FROM orders")
This will work but it is much slower than the other! What am I doing wrong?????
Thanks in advance,