Re: [gnome-db] DSN-less connection



On Mon, 2001-09-03 at 22:01, will lashell net wrote:
> 
> Has there been any thought about connections that don't have
> a DSN? The reason that I ask is that as application developers
> is many instances we don't have control over the system we
> are installing apps to. People can screw up the way connections
> are made etc etc. It would be nice to be able to create a connection
> object and give it a connection string that doesn't use a dsn.
> 
hmm, I don't understand exactly what you mean. If you want to just use a
prototype database, because you've got no access to the big database
server, you can use the default provider, which uses libsqlite, which is
a SQL engine in a library, so it does not need a database server.

It is although a bit limited right now, since it only accepts string
values in fields, and only a subset of SQL, but it might work for
prototyping applications.

On the other hand, if what you mean is to not use a GDA name for the
connection, that's the way it works right now. When you use
gda_connection_open, the dsn parameter is not the DSN name, but the DSN
connection string. So,

gda_connection_set_provider (cnc, "OAFIID:...");
gda_connection_open (cnc, "DATABASE=mydatabase;HOST=myhost", "username",
"password");

[I think I said, in a previous mail, that the second argument to
gda_connection_open was the DSN name. I was wrong, so take this as the
correction]

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/




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