Results 1 to 7 of 7

Thread: Connecting to a DB using ADO

  1. #1

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287

    Connecting to a DB using ADO

    How do Connect to a Access DB via adodc?
    I cant remember the syntix...

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. Dim CNN As New ADODB.Connection
    2.    
    3. Dim RST As New ADODB.Recordset
    4.  
    5. CNN.Open GBLSTRCONSTR & STRSUBDBASE5
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    user-defind type not defind.

    Can you please start from the begining, on how can i connect.
    I'm new to all this database things...
    tnx

    PS: My control is ADO Data Control, is that k?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    That code eliminates use of bound controls...

    You have to adda Reference to get it to work. Ithought you had had some experience in this area before....
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    I had very small experience, and what i had, i guess i forgot...
    I know how to edit, delete, add, and read records.
    What i want to do is to read all the records in a table and get it to a listview.
    How do i do that? (connecting and read 1 record after another)

  6. #6

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    K, I guess its too complicated for now.
    Well I got this if i use Data Control:
    VB Code:
    1. Dim DB As Database
    2. Dim RS As Recordset
    3. Set DB = OpenDatabase(App.Path & "\Stilo.mdb")
    4. Set Data1.Recordset = DB.OpenRecordset("SELECT * FROM Titles WHERE Title Between 'A' And 'B';")
    5.  
    6. How do i continue from now?
    7. I want to read all the records from the table into a listview.

  7. #7

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    Anyone please?

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