Sean,

Looks like that's my only option. I'm running an iMac G5 with OS 10.4.4, so it should work. I'll look at it some more tomorrow, else it's the GetFolderItem route.

TJH


On Feb 8, 2006, at 6:32 PM, Sean Arney wrote:

I repeated my test with a program than has 1 window and 1 pushbutton,
with the action event code:

   DIM AccessDB AS ODBCDatabase
   AccessDB = NEW ODBCDatabase
   AccessDB.DataSource = ""
   IF (AccessDB.Connect) THEN
     MsgBox "we are connected to Access"
   ELSE
     MsgBox "we are not connected"
   END IF

The program has no other code. I still do not get a DSN dialog box,
but I do get "we are not connected". I can execute a GetFolderItem
okay from my program. Is this what you mean by "can you open your DSN
admin window normally?" I also tried loading a string into
AccessDB.DataSource. It behaves like any property defined as a
string. Loading a null string "" does not trigger the DSN dialog box.
Obviously, I am running out of ideas here.    TJH


I see now you are on Win - this doesn't work on Win on my box either but it does on Mac. Must be an error in the LR. Use GetFolderItem to locate your
db and fill the DataSource property with the appropriate info:

  Dim s As String
  Dim ret As String

  Prefs.Get(wndPrefs.Pref_gDBDSN, s)
  ret = "DSN=" + s
  Prefs.Get(wndPrefs.Pref_gUserName , s)
  ret = ret + ";UID=" + s
  Prefs.Get(wndPrefs.Pref_gDBPassword , s)
  ret = ret + ";PWD=" + s
  Prefs.Get(wndPrefs.Pref_gServerAddress , s)
  ret = ret + ";SERVER=" + s
  Prefs.Get(wndPrefs.Pref_gDBName , s)
  ret = ret + ";DATABASE=" + s

  return ret

Should be something like:

"DSN=myAccessDSNName; UID=userName; PWD= password; SERVER = serverAddress;
DATABASE= dbName"

I have mine stored in a prefs mechanism retrieved as above but you can hard
string these in.

I think all you have to give is the DSN.

-seanA



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to