Results 1 to 5 of 5

Thread: ado question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79

    ado question

    i have a mdb - access2000 file with two tables.
    i want to open both tables, and pass info between them.

    i am having problems.... in access97 i used dao, it was easy.
    in access2000 i use ado, and it is different.

    can anyone explain, and/or send a code example......


    to open one table i use the folowing code:

    Dim cnn As New ADODB.Connection
    Dim rs As New ADODB.Recordset

    Dim DBFile As String
    DBFile = App.Path & "\filename.mdb"

    cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & DBFile & _
    ";Persist Security Info=False"

    rs.Open "SELECT * FROM TableName", cnn, adOpenStatic, adLockOptimistic

  2. #2
    New Member
    Join Date
    Aug 2001
    Posts
    11

    Cool Whats your problem?

    so far your code looks right so just define your problem so i could help you
    Whitebat

  3. #3
    New Member
    Join Date
    Aug 2001
    Posts
    11

    Lightbulb

    ps: Why don't to make a select statement like this ?
    Select t1.this t2.that
    from table1 t1, table2 t2
    where
    and
    .
    .
    .
    ??
    Whitebat

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79
    i am getting unusual errors on things like:
    rs.edit, or with block undefined... on things that worked well with access97 and dao, things that dont work now.

  5. #5
    New Member
    Join Date
    Aug 2001
    Posts
    11

    well

    as you now it is microsoft and especially adodc ado dbgrids flexgrid are causing problems all the time . Sometimes it helps when you update your service pack for vb
    on the errors you get i can't say s omething because i don't have the code if you want to you can write me a mail and i try to help you
    Whitebat

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