Results 1 to 5 of 5

Thread: [RESOLVED] Access VB6 Query Problem

  1. #1

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Resolved [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:
    1. sSQL = "SELECT * FROM tblURLs UR, tblUserUrlBridge UB " & _
    2.     "WHERE (UB.UserID = " & CStr(g_lUserID) & _
    3.     ") AND (UR.UrlID = UB.UrlID)"
    4.    
    5.     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?

  2. #2

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: Access VB6 Query Problem

    ut, oh

    Have the vbcode tags changed?

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    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.


  4. #4

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: Access VB6 Query Problem

    It made for a loooong string, but it works!

    Thx ganeshmoorthy

  5. #5
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    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
  •  



Click Here to Expand Forum to Full Width