[RESOLVED] Access VB6 Query Problem
I'm writing a multi user VB6 program with an Access DB.
It's an RSS program and needs to handle multiple users.
There are 3 tables in the DB
tblUsers 'lists users and passwords
tblURLs 'Lists RSS feed Urls, descriptions, etc
tblUserUrlBridge 'Holds each users settings for their chosen RSS URLs
Here's the code being used to open the recordset:
VB Code:
sSQL = "SELECT * FROM tblURLs UR, tblUserUrlBridge UB " & _
"WHERE (UB.UserID = " & CStr(g_lUserID) & _
") AND (UR.UrlID = UB.UrlID)"
rsURLs.Open sSQL, cn, adOpenStatic, adLockOptimistic, adCmdText
It opens the recordset and has all of the fields from both tables except for the UrlID field, the field used to link the two tables.
Is there a way to fix this?
Re: Access VB6 Query Problem
ut, oh
Have the vbcode tags changed?
Re: Access VB6 Query Problem
can you specify the field list in the query as only few fields you have in the tables...like
Code:
SELECT * FROM tblURLs UR, tblUserUrlBridge UB WHERE (UB.UserID = " & CStr(g_lUserID) & ") AND (UR.UrlID = B.UrlID)"
instead
Code:
SELECT UR.UrlID, UB.FieldName, UR.FieldName, UB.Etc FROM tblURLs UR, tblUserUrlBridge UB WHERE (UB.UserID = " & CStr(g_lUserID) & ") AND (UR.UrlID = B.UrlID)"
Re: Access VB6 Query Problem
It made for a loooong string, but it works!
Thx ganeshmoorthy
Re: [RESOLVED] Access VB6 Query Problem
longwolf: you are most welcome...and thanks a lot for the rep points...