Altaf Patni
asked on
Joint Query
Following query i am running from my VB6 form, it was ok with ACCESS Database but now
i have changed it to SQL Seraver 2008 R2, now its not working showing me 0 records. no error nothing..
i have changed it to SQL Seraver 2008 R2, now its not working showing me 0 records. no error nothing..
Rs.Open "Select LS.field1, LS.field2, TR.field1, TR.field2, TR.field3, TR.field4 from LSheet as LS, TReport as TR where TR.field5 = LS.field1 and TR.field6 = '" & Text1(0).Text & "'", Con, adOpenKeyset, adLockOptimistic
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
First of all Thank you very much for QUICK REPLY :-).
INNER JOIN query is working perfectly..
Thanks again
INNER JOIN query is working perfectly..
Thanks again
And what datatypes are the columns in the where clause?
And can you change to this and post the contents of the variable for me:
Dim sSql as string
sSql = "Select LS.field1, LS.field2, TR.field1, TR.field2, TR.field3, TR.field4 from LSheet as LS, TReport as TR where TR.field5 = LS.field1 and TR.field6 = '" & Text1(0).Text & "'
rs.Open sSql, Con, adOpenKeyset, adLockOptimistic