?
Solved

Connecting to PostgreSQL Linux Implementation from Visual Studio 2008

Posted on 2015-01-08
4
Medium Priority
?
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 300 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 300 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

752 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