DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: vb and access

  1. #1
    zinith Guest

    vb and access


    I need some help with accessing a specific table from an Access databse using
    vb. In my database, there's a table that acts as the index for many other
    tables. I want to do a query on this specific table first to find out which
    "sub" table to access next. This index table and the "sub" tables are linked
    together using the relationship function in Access. I dont have a trouble
    access the index table, but how can I access one of the sub tables from the
    result I get when doing a query on the index table? Am i suppose to open
    another connection? I'm using ADO for this problem. Thanx for any help!

  2. #2
    Roy Guest

    Re: vb and access

    Just send a simple SQL statement such as following:

    strSQL = "SELECT * FROM SubTable1 st1, IndexTable it where st1.CategoryID = it.CategoryID and it.CategoryID = " & "'" & myIndex
    & "'"
    Set adoRst = New ADODB.Recordset
    adoRst.Open strSQL, adoConn, , , adCmdText

    Roy

    "zinith" <vb.@127.0.0.1> wrote in message news:3cd13ddf@10.1.10.29...
    >
    > I need some help with accessing a specific table from an Access databse using
    > vb. In my database, there's a table that acts as the index for many other
    > tables. I want to do a query on this specific table first to find out which
    > "sub" table to access next. This index table and the "sub" tables are linked
    > together using the relationship function in Access. I dont have a trouble
    > access the index table, but how can I access one of the sub tables from the
    > result I get when doing a query on the index table? Am i suppose to open
    > another connection? I'm using ADO for this problem. Thanx for any help!




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center