Create Connectionless Recordset Errors
From: Anxan (anthrax_xanadu_at_hotmail.com)
Date: 03/23/04
- Previous message: Kevin Yu [MSFT]: "Re: Pbm using dynamic cursor type with Shaped recordset"
- Next in thread: alex: "RE: Create Connectionless Recordset Errors"
- Reply: alex: "RE: Create Connectionless Recordset Errors"
- Messages sorted by: [ date ] [ thread ]
Date: 23 Mar 2004 07:12:16 -0800
We are slowly porting our old VB6 code over to C#. We currently use
sockets and TCP for communications. Through this we send the binary
data of the ADO recordset. For right now we want to use the same
mechanism until we can change both the server and workstation apps.
However, this means that we must still use ADO 2.6 instead of ADO.NET.
In trying to create a recordset I keep getting an error when I open
it under C#. Below is a snippet of the code I am using. If anyone has
input as to what the problem may be, please let me know.
ADODB.Recordset rs = new ADODB.Recordset;
Object obj1 = null;
Object obj2 = null;
rs.Fields.Append( "Name", adVarChar, 32, adFldMayBeNull, null );
rs.CursorLocation = adUseClient;
rs.Open( obj1, obj2, adOpenForwardOnly, adLockReadOnly, -1 );
This code causes a COMException under C# that says: "Arguments are of
the wrong type, are out of acceptable range, or are in conflict with
one another." The same code works fine under regular c++ and VB6.
Does anyone have any input to this?
Thanks
Adam
- Previous message: Kevin Yu [MSFT]: "Re: Pbm using dynamic cursor type with Shaped recordset"
- Next in thread: alex: "RE: Create Connectionless Recordset Errors"
- Reply: alex: "RE: Create Connectionless Recordset Errors"
- Messages sorted by: [ date ] [ thread ]