CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: ADO

  1. #1
    Join Date
    Aug 1999
    Posts
    14

    ADO

    Hi ,

    Can anyone give me the codes to open
    "MyDatabase.mdb" and open new table "MyTable" to add data to that table

    Thanks


  2. #2

    Re: ADO


    public MyConn as ADODB.Connection
    set MyConn = new ADODB.Connection

    MyConn.Provider = "Microsoft.Jet.OLEDB.3.51"
    MyConn.Open "C:\test.mdb", "", ""

    Dim adors as ADODB.Recordset
    set adors = new ADODB.Recordset
    adors.Open "select * from TestTable", MyConn

    adors.addnew



    'Your Code goes Here
    'your insert statement according to ur columns in your table, your table shd atleast contain one primary key


    adors.update




    The Ultimate Solution Providers

    Authors

    Sriman & Jayaraman

    Email : [email protected]
    [email protected]

    Hand Phone : +(6) 016 2237147 (Malaysia)

  3. #3
    Join Date
    Jun 1999
    Location
    Switzerland
    Posts
    58

    Re: ADO /Askus/Rating

    Sorry "Askus",
    I picked the wrong item from the rating combo
    My vote = "6"

    Jan


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured