Thread: how can Iconnect a Postgres database using odbc in c language?
how can Iconnect a Postgres database using odbc in c language?
From
masculinu@hotmail.com (Maus)
Date:
I know the following java instructions for connecting a DB (oracle in this case): import java.sql...... try { Class.forName("oracle.jdbc.driver.OracleDriver"); String dbUrl ="jdbc:oracle:thin:@"+host+":"+port+":"+sid; Connection m_connection = DriverManager.getConnection(dbUrl,user,passwd); Statement m_statement = m_connection.createStatement(); } catch (ClassNotFoundException ex) {} I'd like to know the equivalent instructions in C language using ODBC for connecting a Postgres DB (with also includes library) Please, is there anyone can tell me which these C language instructions are? Thanks and bye, Maus
On 02/07/2004 16:02 Maus wrote: > [snip] > I'd like to know the equivalent instructions in C language using ODBC > for connecting a Postgres DB (with also includes library) > > Please, is there anyone can tell me which these C language > instructions are? ODBC involves a fair bit more programming than JDBC. I suggest you search the net for an ODBC tutorial. You can find the API documentation on Microsoft's web site. HTH -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+