|
-
Sep 11th, 2001, 02:25 AM
#1
Thread Starter
Lively Member
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
-
Sep 11th, 2001, 05:12 AM
#2
New Member
Whats your problem?
so far your code looks right so just define your problem so i could help you
-
Sep 11th, 2001, 05:16 AM
#3
New Member
ps: Why don't to make a select statement like this ?
Select t1.this t2.that
from table1 t1, table2 t2
where
and
.
.
.
??
-
Sep 11th, 2001, 05:20 AM
#4
Thread Starter
Lively Member
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.
-
Sep 11th, 2001, 05:35 AM
#5
New Member
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
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
|