|
-
Jul 30th, 2003, 04:14 AM
#1
Thread Starter
New Member
Can 1 dataadapter connection to 2 or more data table
Dear all,
I have one datasource and 5 tables in it. No, I am using a very stupid method to access the table
Dim connstr As String = "DSN=TEST"
Dim cn As New OdbcConnection(connstr)
Dim DA1 As New OdbcDataAdapter("SELECT * FROM A",CN)
Dim DA2 As New OdbcDataAdapter("SELECT * FROM B",CN)
Dim DA3 As New OdbcDataAdapter("SELECT * FROM C", cn)
Dim DA4 As New OdbcDataAdapter("SELECT * FROM D", cn)
Dim DA5 As New OdbcDataAdapter("SELECT * FROM E", cn)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cn.Open()
DA1.Fill(ds, "A")
DA2.Fill(ds, "B")
DA3.Fill(ds, "C")
DA4.Fill(ds, "D")
DA5.Fill(ds, "E")
Is there any method to access mulit table in one data adapter.
Thank you for all your 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|