Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ODBC details cached? (XP SP2)

    Can anyone shed some light on a problem I'm having with ODBC linked Oracle tables and the connection string parameters
    I have some code to create links based partly on data in a table, partly on user details (id, password) on a form
    The code goes through each record and creates a new tabledef and appends it to the tabledefs collection

    <pre> With rst
    .MoveFirst
    Do While Not .EOF
    ' update the Status Bar text
    varRet = SysCmd(acSysCmdSetStatus, "Relinking '" _
    & !LocalTableName & "'.....")
    strSourceTableName = !OracleUser & "." & !UniformTableName
    strConnect = "ODBC" & _
    ";DSN=" & !DSN & _
    ";UID=" & !UID & _
    ";PWD=" & !PWD
    ' create the new ODBC linked table and
    ' remember to set the Save PWD flag !!
    Set tdf = db.CreateTableDef(!LocalTableName, _
    dbAttachSavePWD, _
    strSourceTableName, _
    strConnect)
    db.TableDefs.Append tdf
    db.TableDefs.Refresh
    .MoveNext
    Loop
    End With</pre>


    This code works Ok, but I changed the user id and password to values which aren't valid to check, BUT the connection still works !!!
    - stepping through the code, the strConnect is right (i.e. has the invalid user and pwd), but when I look at the table connection property, it's using the original correct id and pwd
    Finally, if I exit Access and then reopen the database, now the Oracle8 ODBC Driver Connect dialog is displayed asking for a valid id and password

    It seems as if there is some caching going on, but I can't see anything in the Access/VBA doc's

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: ODBC details cached? (XP SP2)

    I think this probably has to do with the fact that you probably already have an ODBC Data Source with a defined connection property, including the UserID and password on the workstation. So Access just helps itself to what is already there - just a hunch on my part, as I haven't worked very much with Oracle and the ODBC driver for it.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ODBC details cached? (XP SP2)

    Thanks for the response Wendell. Got any thoughts on where I could look for further info?, especially if there is some way to flush this caching effect ?

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ODBC details cached? (XP SP2)

    We're on Oracle 8.1.7, so I don't know if we've got a similar problem to the Q275111 article
    Can't find the Q27511 article
    Good idea about the Microsoft vs. Oracle. We've had issues before about the differences between them, and it'd be interesting to see if the "caching" effect happens with both of the ODBC drivers

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: ODBC details cached? (XP SP2)

    <<Can't find the Q27511 article>>

    Does that mean you can't click on the hyperlink and get it to display? It works for me, but you never know with browser differences, firewalls, etc.
    Wendell

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ODBC details cached? (XP SP2)

    Yeap, if I click on your link, the Microsoft site responds with a "KB article is not available" warning <img src=/S/frown.gif border=0 alt=frown width=15 height=15>

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ODBC details cached? (XP SP2)

    The first link (Q275111) in your post leads to an existing article, the second one (Q27511) produces the "article not available" message that Steve mentions.

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: ODBC details cached? (XP SP2)

    This probably isn't much help, but article Q275111 describes a similar problem. Another issue is which ODBC driver you are using - Microsoft has one and so does Oracle. And of course both exhibit different behaviors. You might also take a look at http://support.microsoft.com/default...=fh;en-us;odbc.<font color=red>Edited by WendellB to fix broken link 01-Nov-02 05:01 MST</font color=red>
    Wendell

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: ODBC details cached? (XP SP2)

    Sorry, I didn't read close enough to figure out you were referring to the second link. Thanks to Hans for making it clear. Somehow editing the URL didn't go right, but it's fixed now and points to the ODBC support center.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •