Pharo and ODBC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo and ODBC

Olivier Auverlot
Hi,

I try to use the ODBC framework presents in the configurations list and named "ODBC (TorstenBergmann.5)"

I want connect Pharo to a Postgresql server and I installed the latest version of the ODBC driver. The datasource is configured as system datasource. The connection test is ok. My computer uses Windows 7 64 bits.

In Pharo, I try to connect with the following code:

connection := ODBCConnection dsn: 'mysource' user: 'myuser' password: 'mypassword'.
connection close.

The connection fails and I get an error message: "The data source (DSN) has a specified architecture incompatibility between the driver and the application".

Someone have an idea about this problem ? Someone works with the ODBC solution ?

Best regards
OlivierĀ 
Reply | Threaded
Open this post in threaded view
|

Re: Pharo and ODBC

Markus Fritsche-4
Hello Olivier,

did you create the DSN using
C:\WINDOWS\SysWow64\odbcad32.exe
?

The 32 Bit ODBC Adminstration Console is located in SysWow64, if you
just start the ODBC Adminstration Console from the system admin tools,
you will get the 64 Bit version, which is located in C:\WINDOWS\system32 :)


Reply | Threaded
Open this post in threaded view
|

Re: Pharo and ODBC

S Krish
In reply to this post by Olivier Auverlot

Plausible Pharo 32 bit / 64 bit conflict..?

http://msdn.microsoft.com/en-us/library/ms712362%28v=vs.85%29.aspx

"If you use the 64-bit odbcad32.exe to configure or remove a DSN that connects to a 32-bit driver, for example, Driver do Microsoft Access (*.mdb), you will receive the following error message:"

On Thu, Nov 20, 2014 at 1:35 PM, olivier auverlot <[hidden email]> wrote:
Hi,

I try to use the ODBC framework presents in the configurations list and named "ODBC (TorstenBergmann.5)"

I want connect Pharo to a Postgresql server and I installed the latest version of the ODBC driver. The datasource is configured as system datasource. The connection test is ok. My computer uses Windows 7 64 bits.

In Pharo, I try to connect with the following code:

connection := ODBCConnection dsn: 'mysource' user: 'myuser' password: 'mypassword'.
connection close.

The connection fails and I get an error message: "The data source (DSN) has a specified architecture incompatibility between the driver and the application".

Someone have an idea about this problem ? Someone works with the ODBC solution ?

Best regards
OlivierĀ 

Reply | Threaded
Open this post in threaded view
|

Re: Pharo and ODBC

Olivier Auverlot
Thanks for your help.

The ODBC source must be declared with C:\WINDOWS\SysWow64\odbcad32.exe and use 32 bits mode.



2014-11-20 9:56 GMT+01:00 S Krish <[hidden email]>:

Plausible Pharo 32 bit / 64 bit conflict..?

http://msdn.microsoft.com/en-us/library/ms712362%28v=vs.85%29.aspx

"If you use the 64-bit odbcad32.exe to configure or remove a DSN that connects to a 32-bit driver, for example, Driver do Microsoft Access (*.mdb), you will receive the following error message:"

On Thu, Nov 20, 2014 at 1:35 PM, olivier auverlot <[hidden email]> wrote:
Hi,

I try to use the ODBC framework presents in the configurations list and named "ODBC (TorstenBergmann.5)"

I want connect Pharo to a Postgresql server and I installed the latest version of the ODBC driver. The datasource is configured as system datasource. The connection test is ok. My computer uses Windows 7 64 bits.

In Pharo, I try to connect with the following code:

connection := ODBCConnection dsn: 'mysource' user: 'myuser' password: 'mypassword'.
connection close.

The connection fails and I get an error message: "The data source (DSN) has a specified architecture incompatibility between the driver and the application".

Someone have an idea about this problem ? Someone works with the ODBC solution ?

Best regards
OlivierĀ