|
-
Jan 30th, 2000, 09:22 PM
#1
Thread Starter
Junior Member
Hi guys. 
I have two tables (Bags and Category) and I need to JOIN the tables.
If I use the DAO object whith the SQL statemant, its works OK, but if I try to use the ADO object, the Recordset comes empty.
I try to use this code:
cSQL = ""
cSQL = cSQL & "SELECT Bag.Name, Category.Price "
cSQL = cSQL & "FROM Bag "
cSQL = cSQL & "INNER JOIN Category "
cSQL = cSQL & "ON Bag.CodCategory = Category.CodCategory"
cSQL = cSQL & "WHERE Bag.Code = '" & Format(CodeBag, "00000") & "'"
Set RecSet = New ADODB.Recordset
RecSet.Open cSQL, cnConexao, adOpenKeyset, adLockBatchOptimistic
The same SQL statement works fine in Microsoft Access and VisData, but not in my application. If I'm cut the INNER JOIN statement, the Recordset comes with 1 row.
Do anyone know how can I resolv this?
Tkx from Brazil!
[This message has been edited by Emidio (edited 01-31-2000).]
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
|