Re: Connecting by data source?



Brian Jepson wrote:

> I've been looking at the example programs in gnome-db/testing, and it
> looks like all the gda-client-test* examples use a provider name, user id,
> password, and database to connect to a data source.  Is there a function
> like gda_connection_open that takes a data source from ~/.gnome/gdalib as
> an argument?  I'd like to use this approach in the example programs I'm
> writing for my chapter, so I can say something like:
>
>   gda_connection_open(cnc, "Postgres-Native");
>
> instead of:
>
>   gda_connection_set_provider(cnc, provider);
>   gda_connection_open(cnc, database, username, password) ;
>
> that way, I can worry about database, user id, password, and provider in
> ~/.gnome/gdalib instead of on the command line.
>
>

I agree with Stephan. I don't think data sources should include user and
password info, since this will mean having to create the same datasource many
times, one for each user you want to use to access the database.

Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]