Using ADOdb recordset inside of .Net

M

MFRASER

Does anyone have an example of how to use an ADOdb recordset inside of .Net?
I am trying to interface with a VB application that uses the ADOdb
recordset.

Here is my code:

ADODB.Recordset rst = new Recordset();

ADODB.Connection conn = new Connection();

ADODB.Command cmd = new Command();

object records = null;

object rstparams = null;

string sqlStatement = "";


conn.Open(gConnString,"","", 0);

cmd.ActiveConnection = conn;

cmd.CommandText = sqlStatement;

cmd.CommandType = ADODB.CommandTypeEnum.adCmdText;

cmd.Dialect = "{2BDA0E41-4A58-4721-BC09-6670511BC530}";

rst = cmd.Execute(out records, ref rstparams, 0);
 
M

MFRASER

I was able to get this to work using an object nullobj = Type.Missing in the
place of optional params.
 
M

MFRASER

I was able to get this to work using an object nullobj = Type.Missing in the
place of optional params.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top