Postgres and Visual studio asp.net - asp.net

How can I add a postgresql database to a Visual studio asp .net project? I have tried by downloading the postgres odbc driver but still I can't see it in the odbc menu and is there any other way to do it

Most Visual Studio versions are 32-bit applications, even when installed on 64-bit Windows. The ODBC driver must match the application architecture, not the PostgreSQL server architecture.
Install the 32-bit ODBC driver.

Related

Can Oracle ManagedDataAccess 4.122.1.0 connect to Oracle server 19c?

We have a .NET MVC 5 application and several APIs using the Oracle ManagedDataAccess driver (version 4.122.1.0) to connect to a 12c Oracle server (version 12.1.0.2.0). We are about to upgrade to 19c. Will this version of the Oracle ManagedDataAccess driver connect to 19c or do I need to re-publish all of these apps with a newer driver?
See System Requirements
Oracle Data Provider for .NET, Managed Driver requires the following:
Same Windows operating system support as ODP.NET, Unmanaged Driver.
ODP.NET, Managed Driver is built with AnyCPU. It runs on either 32-bit or 64-bit (x64) Windows and on either 32-bit or 64-bit (x64) .NET Framework.
Microsoft .NET Framework 4.5.2, 4.6.x, or 4.7.x.
Access to Oracle Database 11g Release 2 or later
So, no problem.

Oracle 10G Installation on Windows

I have a database: Oracle SQL Developer 3.2.20.9
an asp.net web application running locally on a pc with Windows 7 enterprise 64 bit, and to developed it I used Visual Studio 2013.
Now I should connect the application with the db so I' m trying to install:
Oracle 10g ODAC and Oracle Developer Tools for Visual Studio .NET
I get this Error:
"Abnormal program termination. an internal error has occured. Please provide the following files to Oracle Support:
Unknown
Unknown
Unknown"
Could I connect the webapp in other ways?
When I go to Server Explorer in Visual Studio and I choose connect to database -> add connection -> Oracle database -> .NET framework Data Provider for Oracle
I get:
"This provider is deprecated and should not be used. Instead, download Oracle Developer Tools for visual Studio for comprehensive integration with Oracle databases."
Oracle supports connections back two versions. You should try installing the ODAC client for 11g as that will connect to a version 10 database and supports windows 7.
Seeing as SQL developer is free why not get the latest version 4.02 here
Be sure to get an ODAC version that matches the bitness of the database, 32 bit or 64 bit. You can check this by logging onto the machine with Run > cmd > sqlplus > connect as your user/your password. If the header that is returned does not say 64 bit then the database is a 32 bit install and you need ODAC to match that.
And seeing as connecting to Oracle is popular question a good troubleshooting routine is
connect from sqlplus on the database
connect with sql developer from your client pc
then try connecting through Visual Studio.

Install Oracle Database Extensions for .NET into VS2013

How to install Oracle Database Extensions for .NET into VS2013.
32-bit Oracle Data Access Components (ODAC)
with Oracle Developer Tools for Visual Studio
Everytime I run this installer, it is always exclude Oracle Database Extensions for .NET. There is a reminder of for upgrade only in the description of the package installer.
Oracle Database Extensions for .NET 4 12.1.0.1.0 -- for upgrade only
Oracle Database Extensions for .NET 2.0 12.1.0.1.0 -- for upgrade only
So where should I get the installer for Oracle Database Extensions? Currently I using VS2013 Professional and Oracle database server 11g 64 bits.
I need that because of Developing and Deploying a .NET Stored Procedure using Oracle Deployment Wizard.
Developing and Deploying a .NET Stored Procedure
Inside this website, you can see the tutorial for VS2010 version.
Additional: I have to use Oracle 12c client 32bits because of VS2013 and Entity Framework.
Additional: I have ttied 64 bits, but my VS2013 still doesn't have Deploy option
Well, this is guesswork:
Try installing Oracle 10g ODAC and Oracle Developer Tools for Visual Studio .NET (very bottom of the downloads page) first, and then install the latest for upgrade only distribution.
Okay, here's an excerpt from Oracle Database Extensions for .NET:
This product is included with the Oracle Database on Windows installation. Further upgrades are installed as part of the Oracle Database Access Components (ODAC) releases, however Oracle Database Extensions for .NET must first be installed and configured before it can be upgraded.
Also, I found Oracle® Database Extensions for .NET Developer's Guide 12c Release 1 (12.1) for Microsoft Windows. In it's Installation and Configuration > Installation section:
Before the first use of Oracle Database Extensions for .NET, do the following:
Install Oracle Database 12c and either allow the installer to create the database for you, or install the database software only and use Database Configuration Assistant to create a database afterwards.
After installation and database creation, execute the following to enable Oracle Database Extensions for .NET.
chopt enable ode_net
Execute the following to create the Oracle Database Extensions for .NET windows service.
oraclrctl -new
Bottom line: You have to install Oracle Database 12c to enjoy Oracle Database Extensions for .NET. It is meant to be a service running along with the database server, not in the client.

Cannot connect to FoxPro database due to architecture mismatch between Driver and Application

Getting this error message when attempting to connect to a FoxPro database via a DSN on a Windows 7 x64 PC:
The specified DSN contains an architecture mismatch between the Driver and Application
This project uses Visual Studio 2005. The connection settings point to a 32-bit DSN ODBC configuration correctly. Not using the default x64 ODBC DSN. I even went into the registry (Wow6432Node) to make sure the FoxPro driver was pointing to the driver in the 32-bit location (sysWow64 directory).
Stumped - any ideas?
The Visual Studio 2005 project was configured for "Any CPU", and needed to be set to x86 explicitly. That was the difference, even though the DSN was pointing to the correct 32-bit driver.
Platform target: x86

Oracle Database client error

I have 64bit windows and I have Visual studio 2012 also 64bit. I have installed the 64-bit Oracle client, but I am getting this message when I try to connect to my database server..
Attempt to load oracle client libraries threw badimageformatexception. This problem will occur when running in 64bit mode with the 32 bit Oracle client components installed at DataObjectSupport(721,6)
Any solutions?
Visual Studio IDE (at least 2012 and below) is 32bit, not 64bit.
If you check the path, you will it runs from:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
not, from "C:\Program Files\Microsoft Visual Studio 11.0".
Therefore, to connect to an Oracle database from the IDE itself, you need the 32bit client installed (in addtion to the 64bit client, if you need it for x64 apps).

Resources