Re: ODBC question [ Matt]

new topic     » goto parent     » topic index » view thread      » older message » newer message

George Walters wrote:
> 
> 
> I've been using ODBC for some time and have run into a problem I would like
> to solve. My understanding is the issue here. I have multiple customers 
> running the software (all having the same database name). I had been thinking
> that the 1st argument below was the data base name, but it looks like it is
> the DSN, as in the windows XP Data Sources (ODBC) panel.

That is correct.  You need to use the DSN whenever you try to connect to 
a database through ODBC.

> --Establishes a connection to a DSN.  Returns the integer id of the
> connection.
> global function openConnectionODBC( sequence server, sequence user,
>         sequence authentication )
> 
> Setting up the windows panel for the DSN's the user and password is entered
> there, but it is also in this argument call which seems to not be necessary
> or could be contradictory.

If the user saves the password in the ODBC dialog, it may be remembered when
you try to connect, but I think it's a security issue that requires the 
password whenever you connect.  I suppose that the control panel applet is
sort of its own program, and you might think about it as saving the 
password for its own use, rather than for general use.

> I'm wondering if I should be calling 
> 
> global function dataSourcesODBC( )
> 
> and getting the database (or is it the DSN) , user, and password from there
> 
> Matt could you give a small digressionl on this?

That's one way to get a listing of DSNs available.  I guess it depends on
how your app works.  I would imagine that you'd call this function when
the user configures your app, and that your app would remember the DSN,
user and password (or require the user to log in each time) for the
user's convenience.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu