Link to home
Start Free TrialLog in
Avatar of Altaf Patni
Altaf PatniFlag for India

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..

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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Cluskitt
Cluskitt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I need a little more context please.  This is in an access client against tables that are linked to sql server tables?

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
Avatar of Altaf Patni

ASKER

First of all Thank you very much for QUICK REPLY :-).

INNER JOIN query is working perfectly..
Thanks again