R
Raymon
I am trying to create an ADODB recordset but I am getting an error.
(Don't say to use ADO.Net. I have to use classic ADO; it is a legacy
requirement.)
In old VB6 I used to create a disconnected ADODB recordset like:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Fields.Append "Col1", adVarChar, 30
rs.Open
In C# I try:
ADODB.Recordset rs = new ADODB.Recordset();
rs.Fields.Append("Col1", adVarChar, 30);
But the last statement gives a MissingMethod exception, as if
there is no Append method. Although it shows up in the
Intellisense.
This is not caught during compile, only at runtime.
Is there a way to create an ADODB recordset in code in .Net?
BTW, I am using .Net Framework 4.0.
(Don't say to use ADO.Net. I have to use classic ADO; it is a legacy
requirement.)
In old VB6 I used to create a disconnected ADODB recordset like:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Fields.Append "Col1", adVarChar, 30
rs.Open
In C# I try:
ADODB.Recordset rs = new ADODB.Recordset();
rs.Fields.Append("Col1", adVarChar, 30);
But the last statement gives a MissingMethod exception, as if
there is no Append method. Although it shows up in the
Intellisense.
This is not caught during compile, only at runtime.
Is there a way to create an ADODB recordset in code in .Net?
BTW, I am using .Net Framework 4.0.