Re: how to connect to postgres and MySQL



Grizzly(Francis Smit) wrote:
> OK I've found an example of connecting to SQLite:
>
> http://www.gtkmm.org/docs/libgnomedbmm-3.0/docs/tutorial/html/ch03s05.html
>
> Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
> ....
> ....
> ....
> client->open_connection_from_string("SQLite", "DB_DIR="
> LIBGNOMEDB_DATADIR ";DB_NAME=demo_db",
>                                               "" /* username */, "" /*
> password */);
>
> but I cannot find an example of how to connect to MySQL and postgres  
> does any one know what the parameters should be??
>
>   
OK I worked it out it's: MySQL or PostgreSQL instead of  SQLite and HOST
instead of DB_DIR works like a charm

-- 
  In my life God comes first.... but Linux is pretty high after that :-D
Grizzly(Francis Smit)
http://www.geekcode.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/P/PA d- s+:+> a+>? C++++ UL++++@ P+ L+++ E--- W+++ N+(++) K w--- M-- V-- PS(+) PE(-) Y+(++) PGP++ t+(++) 5 X- R- tv b+++(++++) DI(--) D G e++(+++) h-- r- y-
------END GEEK CODE BLOCK------



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