How to connect pervasive sql Database and Web Site using DSN - iis

I am having an application that is running on IIS with Enabled 32 bit Application.
In a remote server(connection available in local machine),i have installed Pervasive SQL.
I have installed Pervasive SQL Driver in local machine and trying to connect the database "TestApplication" in Pervasive SQL.
For that I have created System DSN "DSNTEST", and tried with Windows Application.Its working fine.
But i couldnt connect to the database from Web Site.
An error occured "Error: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application".
Can anyone please help me to resolve this?
Thanks in advance.

It sounds like the ASP.NET application is trying to run as a 64 bit application. Because you're using PSQL v11, you can install the 64 bit ODBC driver which is part of the PSQL v11 64 bit client install (at http://www.pervasive.com/database/Home/Products/PSQLv11.aspx).
The other option is to make sure that the ASP.NET project is built with a target of x86 rather than x64 or AnyCPU.

Related

Nodejs oracle Db connection on Openshift platform

I have created and deployed node.js application on Openshift platform.
I need to connect to oracle db which is on a remote host.
I am able to connect to the oracle Db from my local machine as i have installed oracle client.
But when I deploy the application to Openshift platform I get below error.
Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so
I know I need Oracle client installed on the hosting system.. but the openshift platform doesn't allow me any installation.
Can anybody suggest me any way how to get around this.
Thanks in advance.
Can you deploy a Docker container? If so, then check out https://github.com/oracle/docker-images/blob/master/OracleLinuxDevelopers/oraclelinux7/nodejs/12-oracledb/Dockerfile. Also see the node-oracledb installation instructions for docker: https://oracle.github.io/node-oracledb/INSTALL.html#docker. And see the blog post series https://blogs.oracle.com/opal/docker-for-oracle-database-applications-in-nodejs-and-python-part-1

32bit pyodbc for 32bit python (3.6) works with microsoft's 64 bit odbc driver. Why?

What I can observe:
I am using windows 7 64bit My code (establish an odbc connection with
a SQL server on the network, simple reading operations only) is
written in python 3.6.2 32bit
I pip installed pyodbc, so I assume that was 32bit as well.
I downloaded and installed the 64bit "Microsoft® ODBC Driver 13.1 for SQL Server®" from microsoft website.
My python code connects to
other computers on the network, which run server2003 32bit and either SQL Server 2005(32bit) or sql2008(32bit).
The setup works.
Moreover: cursory test shows that, the above setup can successfully connect to a computer with Microsoft server2008(64bit) running sql2012(64bit) with the configuration under "SQL Server Network Connection (32bit)" being empty (meaing, the 32bit dll is missing), while the default 64 bit network connection configuration contains the usual config options like ip adress and listening port info.
My own explanation:
[1] the client and the server's OS and ODBC interfaces can be of any 32/64 bit combination, but the protocol that travels thru the network between my computer and the sql computer will be identical.
[2] 32 bit python+pyodbc can talk to microsoft's 64bit odbc driver, because... 32 bit python knows how to use a 64 bit DLL...?
A 32bit application can NOT invoke a 64bit dll, so python 32bit can not talk to a 64bit driver for sure.
msodbc driver for sql server is in essence a dll file: msodbcsql13.dll
I just found out (which is not even mentioned by microsoft) that "odbc for sql server 13.1 x64" will install a 64bit msodbcsql13.dll in system32 and a 32bit msodbcsql13.dll in SysWOW64 ( 32bit version of "system32" on a 64bit windows system)
I can not however be certain that the network protocol between a 32bit client talking to 64bit sql server will be the same as a 64bit client talking to a 64bit sql server. But, I believe that, once a request is put on the network by the client to the server, 32bit or 64bit doesn't matter anymore. Someone please comment on this

Connect from Excel 2007 to Oracle via ODBC (Windows7 x64)

I have a Windows 7 64 bit and Excel 2007 32 bit.
I need to connect with Oracle DB by ODBC.
How can i create the above connection?
I installed 32bit client:
instantclient-basic-nt-12.1.0.2.0 and
instantclient-odbc-nt-12.1.0.2.0,
I created necessary environment paths (PATH, ORACLE_HOME, TNS_ADMIN) and I add ORACLE_HOME to variable PATH in system path.
When I'm trying to create DSN in C:\Windows\SysWOW64\odbcad32.exe I'm getting an error nr 126: system can not find a file SQORAS32.dll in %ORACLE_HOME%...
Any ideas?
I created ODBC connection!
The problem with error nr 126 still appears when I'm trying to create connection using driver "Oracle in instalclient_12_1", but when I'm using driver "Microsoft ODBC for Oracle" it works ok.

Could not create connection from Driver

i am new to the oracle. ,My project is .net web application which is connected to the oracle database(oracle 11g) when i run my solution in local environment, i get the error in the below line saying that "Could not create connection from Driver".
return factory.ConnectionProvider.GetConnection();
but this project is working fine in windows XP and I am using windows 7 with oracle 11g installed in my system where i am facing the problem.please can any one give solution.
I understand from the team that this project is designed with oracle 9.2 in mind. how do i make it work in oracle 11g which i have it currently.
I would advise you to use Oracle's Managed Data Provider for .NET. All your problems with local Oracle installations will go away immediately. Since it's a 100% managed driver, you won't need to install Oracle's client on your machine before connecting to it with .NET programs.

attempt to load oracle client libraries threw badimageformatexception

I am using Visual Studio 2012. I installed Oracle 64bit Client. My Operating system is Win7 64 bit. I want add a new Oracle DB connection but when I enter username password etc. and click 'Test Connection' button, I see this error:
attempt to load oracle client libraries threw badimageformatexception
This problem will occur when running in 64 bit mode with the 32 bit
Oracle client components installed.
But my Oracle Client is 64 bit. There is no any 32 bit component on my system.
I am also having problem on Oracle.DataAccess.dll added to my references. I tried EVERY COMBINATION which is Any CPU, x86i x64 platforms but nothing has changed. Everytime I get BadImageFormatException.
I searched for another questions but nothing has changed. I also tried IIS App Pool Enable 32bit applications property to True but it doesnt work.
Any suggestions? What else I can try?

Resources