Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   C#Net2008 Declare ADODB.RECORDSET (http://www.go4expert.com/community/c-sharpnet2008-declare-adodbrecordset-t22509/)

Lennie 23Jun2010 14:41

C#Net2008 Declare ADODB.RECORDSET
 
Hi Frieldly Good Guy,:drum:
I need your help. Please help me.

Was asked to use ADODB.Recordset and not sure how to declare it thus encounter error message listed below

Error 1 A new expression requires (), [], or {} after type
Error 2 A new expression requires (), [], or {} after type

Here are the coding

Code:


using System.Data;
using System.Data.OleDB;
using System.Data.SqlClient;
Using ADODB;
using ADODR;
namespace CSharpNet2008ADONet
{
  public partial class FrmCustomerMaint : Form
  {
      public FrmCustomerMaint()
      {
          InitializeComponent();
      }
        ADODB.Recordset adoRst  = new ADODB.Recordset;    <--- Error
        ADODB.Connection adoConn = new ADODB.Connection; <---Error
  }
}

Thank You.

Have a Good Day.
Cheers,
Lennie


All times are GMT +5.5. The time now is 12:44.