Results 1 to 9 of 9

Thread: vb.net and ado [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    vb.net and ado [RESOLVED]

    can you still use ado when you program in vb.net? I'm sure there is no problem.
    Last edited by Andy; Feb 11th, 2004 at 09:39 PM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Use ADO.NET.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    thats what I'm running up against. my project leader want to use ado and no ado.net. Now I've got to learn no only vb.net but ado AND how to use the two together!! what a life

  4. #4
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    u can use ADODB
    Regards

  5. #5
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    Set myConnection = New ADODB.Connection
    Set myRecordset = New ADODB.Recordset

    myConnection.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=abc.mdb"

    myConnection.Open


    myRecordset.Open "Select * from tablename ", myConnection

    bla
    bla
    bla
    Regards

  6. #6
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    mendhak

    ADO.NET is a replacement for ADO.

    As far as I know ADO.NET is for non connected mode and if ur project is like the one of airlines or train reservation, u cannot use ADO.NET
    Regards

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    Originally posted by sw_is_great
    Set myConnection = New ADODB.Connection
    Set myRecordset = New ADODB.Recordset

    myConnection.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=abc.mdb"

    myConnection.Open


    myRecordset.Open "Select * from tablename ", myConnection

    bla
    bla
    bla
    when I enter this in my program, (I have to use 'dim' instead of 'set' or i get a syntax error) I get the familiar squigly blue underlines and it says that the adodb.connection is not defined. same with the recordset. is there a namespace I need to import?
    Last edited by Andy; Jan 26th, 2004 at 10:45 AM.

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    aha! discovered that I need to goto 'Project' and then add a reference to adodb!! learning...learning!!

  9. #9
    Lively Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    90
    Many of the ADODB (ADO) properties are displayed in adoanywhere free tool. Helps you learn faster.
    Mike Collier
    Free ADO & DotNet Tools and Source
    AdoAnywhere


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