C#Net2008 Declare ADODB.RECORDSET

Discussion in 'Meet and Greet' started by Lennie, Jun 23, 2010.

  1. Lennie

    Lennie New Member

    Joined:
    Feb 5, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Analyst Progammer
    Location:
    New Zealand
    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:
     
    [COLOR=blue]using System.Data;[/COLOR]
    [COLOR=blue]using System.Data.OleDB;[/COLOR]
    [COLOR=blue]using System.Data.SqlClient;[/COLOR]
    [COLOR=blue]Using ADODB;[/COLOR]
    [COLOR=blue]using ADODR;[/COLOR]
    [COLOR=blue]namespace CSharpNet2008ADONet[/COLOR]
    [COLOR=blue]{[/COLOR]
    [COLOR=blue]   public partial class FrmCustomerMaint : Form[/COLOR]
    [COLOR=blue]   {[/COLOR]
    [COLOR=blue]       public FrmCustomerMaint()[/COLOR]
    [COLOR=blue]       {[/COLOR]
    [COLOR=blue]           InitializeComponent();[/COLOR]
    [COLOR=blue]       }[/COLOR]
    [COLOR=blue]        ADODB.Recordset adoRst  = new ADODB.Recordset;    [COLOR=red][B]<--- Error[/B][/COLOR]
             ADODB.Connection adoConn = new ADODB.Connection; [COLOR=red][B]<---Error[/B][/COLOR]
       }
    }[/COLOR] 
    Thank You.

    Have a Good Day.
    Cheers,
    Lennie
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice