ODBC with VS 2005 and PostgreSQL

ODBC with VS 2005 and PostgreSQL

Post by Jonathan B » Fri, 02 Jun 2006 10:13:48


I am using a PostgreSQL database and want to connect to it using ODBC.

I am trying to follow the details but am getting very confused. Maybe
someone could help me.

I have used an external ODBC connector (libodbc++) to connect. This works
perfectly for fetching data.

Now I want to create fields on a screen taht show data from the database and
don't think I can do it like that.

So - I created a database source using the wizard and use it as a basis to
get data. This works ok but I cannot see how to switch between different
datasources. I tried editing the connection string but it still goes to the
original data source.

I also looked at the online doctumentation and it talks about the CDatabase
class and that seems to be different again!

On one of the other groups some said I should use the built-in APIs.
I decided to try and see if a result set from there could be alocated
directly to a Combo.
However, I can't get my program to compile.
It doesn't recognise any of the classes and types.

I added:
using namespace System::Data::Odbc;

but that made no difference.

I am obviously doing something stupid since I am a newbie.

So, what am I supposed to be using and/or doing?

Jonathan Blitz
Anykey Limited
Israel
 
 
 

1. odbc: mysql vs. postgresql

2. VS 2005 dataset config wizard on db2 odbc connection

The dataset designer is very handy to make a dataset and tableadapter in one
go, but when it has to connect to DB2 odbc there are several problems.

This is on a Win2000 pc with connection to DB2 v5r2 and VS2005 with VB.

1. The insert and update statements is generated for the key field and for
no other field in the table.

2. to correct the mistakes you have to edit the sql statements. After that
there is a chance that you loose the datasets or the design.vb source.
Have had a corrupt project twice.

Does anyone else notice this behaviour and is there a way to avoid it?

--
Jan D''Hondt
Jade bvba
Belgium
Database and .NET development

<Toto, I''ve got a feeling we''re not in Kansas anymore.>

3. VS Studio 2005 beta 2 Error 1919, ODBC error 6

4. Cannot add Oracle ODBC tables to Data Designer panel using VS.NET 2005

5. D3 ODBC & VS 2005 Beta 2

6. DBD::ODBC multiple active statements (was Trouble Installing DBD::ODBC with postgresql)

7. VS 2005 Build vs Precompilation vs VS 2003 Build

8. Converting VS 2005 Web Site Project to VS 2005 Web Application Pro

9. Posting VS 2005 RC code to VS 2005 Beta 2 site

10. Is VS 2005 Team Editn for DB prof same as VS 2005 Team Edition for

11. Is VS 2005 Team Edition for DB prof same as VS 2005 Team Edition D

12. Difference btwn VS .Net 2005 and VS 2005

13. Is VS 2005 Team Editn for DB prof same as VS 2005 Team Edition for

14. VS 2005 doesn't start up after installing VS 2005 SP1

15. Converting VS 2005 Web Site Project to VS 2005 Web Application Project