473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how could I connect a Postgres database in c language using odbc?

For connecting a DB (Oracle in this case) in JDBC I know the follow
java instructions:

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();

Now, I'd like to know the equivalent instructions in c language using
ODBC for connecting a Postgres database.

Please, could anyone help me and tell me which these instructions are?

Thanks and bye,
Maus
Nov 23 '05 #1
0 1314

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " ....
3
by: Lee | last post by:
Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After...
1
by: Rick Hickerson | last post by:
I can't get PHP to connect to DB2 on the same server. I'm running both Apache/PHP and DB2 on Mandrake Linux 9.2. I didn't compile PHP; just installed what appear to be the appropriate RPMs (I...
3
by: Fabian Knopf | last post by:
Hi friends, i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To...
0
by: Jesse | last post by:
Hi all, I need some help with Access database and Postgres Database i am trying to link some Acces tables to Postgres tabels but id doesn't seem to work. I have a Postgres running on a server...
1
by: Maus | last post by:
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...
8
by: CJM | last post by:
I have a working web application (ASP) which links to an Oracle 10g DB via OO4O. I'm trying to port it to either of two test servers, but in fact, I can't get it to work with either - 'Unable to...
0
by: NM | last post by:
Hello, I've got a problem inserting binary objects into the postgres database. I have binary objects (e.g. images or smth else) of any size which I want to insert into the database. Funny is it...
0
by: kishoramballi | last post by:
Hi, I have created table using following sql statement through psql tool in test database using create table t1(f1 int); table is created. Now I am using an odbc script to insert 5 records....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.