|
-
Nov 12th, 2006, 08:25 PM
#1
Thread Starter
Frenzied Member
[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?
-
Nov 12th, 2006, 08:25 PM
#2
Thread Starter
Frenzied Member
Re: Access VB6 Query Problem
ut, oh
Have the vbcode tags changed?
-
Nov 13th, 2006, 04:24 AM
#3
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)"
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Nov 13th, 2006, 08:39 AM
#4
Thread Starter
Frenzied Member
Re: Access VB6 Query Problem
It made for a loooong string, but it works!
Thx ganeshmoorthy
-
Nov 14th, 2006, 12:41 AM
#5
Re: [RESOLVED] Access VB6 Query Problem
longwolf: you are most welcome...and thanks a lot for the rep points...
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
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
|