Solved

Connecting to PostgreSQL Linux Implementation from Visual Studio 2008

Posted on 2015-01-08
4
294 Views
Last Modified: 2015-01-13
What is the best method to connect from Visual Studio (and SSRS) to linux. I have tried DSN but keep seeing this message "The specified DSN contains an architecture mismatch between the Driver and Application".

Have also tried using connection string but no luck.

Please provide guides as to best method to use and complete syntax of connection string if required.

My Windows SQL and Visual Studio box is Windows 2008 Server.
0
Comment
Question by:nussedog
  • 2
4 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 150 total points
ID: 40539078
There are some connection string listed here that you might try:  http://www.connectionstrings.com/postgresql/
0
 
LVL 2

Assisted Solution

by:Mike Lloyd
Mike Lloyd earned 150 total points
ID: 40539262
It sounds like you have the wrong ODBC drivers. Try the PostgreSQL drivers, located here: http://www.postgresql.org/ftp/odbc/versions/msi/
0
 

Accepted Solution

by:
nussedog earned 0 total points
ID: 40539364
Thanks everyone.
I had already visited both the sites referenced above.

Turns out the actual issue was the configuration of the ODBC driver. There are two ODBC configuration tools provided by Microsoft. The default tool is the 32bit version and will install only 32 ODBC driver. I had to manually run the 64bit configuration tool  so that the correct 64bit ODBC driver would be installed.

The ODBC.ini file was correctly modified and lines 5 & 6 added after executing %windir%\syswow64\odbcad32.exe.
001 [ODBC 32 bit Data Sources]
002 PeopleNet=PostgreSQL ANSI(x64) (32 bit)
003 PeopleNet64=PostgreSQL Unicode (32 bit)
004 [PeopleNet]
005 Driver32=C:\Program Files\psqlODBC\0903\bin\psqlodbc30a.dll
006 [PeopleNet64]
007 Driver32=C:\Program Files (x86)\psqlODBC\0903\bin\psqlodbc35w.dll

I found a complete explanation of this 'oddity' at the link below:
http://www.easysoft.com/developer/interfaces/odbc/64-bit.html#odbc-windows
0
 

Author Closing Comment

by:nussedog
ID: 40546247
"A" for effort
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now