VB6 "Provider cannot be found." - vb6

I have a few applications written in VB6 that are all using the same connection string on the same machine. They are using the ODBC provider with the SQL Server Native Client 10.0 driver and connecting with explicit username and password.
At run-time, one of the applications throws an exception when I try to connect to the database:
3706: Provider cannot be found. It may not be properly installed.
I don't understand why this one application is having an issue when the others are working fine. The references are the same, down to the version number.

Try installing MDAC on your machine.

If you are using the program on another system and using Access you will need to download and install http://www.microsoft.com/download/en/details.aspx?id=23734 if access is not installed on the system

Related

How can I run my project on client pc without installing SQL server on client pc

I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.

Odbc dsn-less conection string error IM002

i want to build an app in cpp, my OS win 10. I have downloaded driver from microsoft docs site.
driver Microsoft odbc for oracle
The issue is with SQLDriverConnect in connection string
If i try to use e.g. this string "driver={Microsoft ODBC for Oracle};uid=name;pwd=passwd;server=//ip:port/aaa",
Throws 2 errors 01500 and IM002. the issue is probably with server arg. so tried this string "DRIVER=Microsoft ODBC for Oracle; UID=name; PWD=passwd;DBQ=(SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ip)(PORT=port))(CONNECT_DATA=(SID=aaa))));",
First error fixed but there is still second one IM002. From this [microsoft docs][1] i know that error is with Data source name. I do not want to setup DSN in windows, just want app to be portable without setting dsn
What i am doing wrong, i am beginner in the company and never worked with oracle
Thank you
Note: IP is intranet company DB for customers (because of security)
[1]: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function?view=sql-server-ver15

Configure DB2 on windows. JDBC error

My organisation wants to setup DB2 for our .Net application that links/uses the database setup on a remote desktop with a fixed IP address. Now, I'm trying to setup this DB2 databse using DB2 Express-C and IBM Data Studio and it is unable to connect to the database through the Java connection.
How do I know this? I tried performing a normal SQL operation using a DB2 command window and it worked.
If I try to do the same thing with Data Studio or command line processor, it doesn't work: always throws a 'user ID revoked' error.
I tried reconfiguring environment variables to JDBC4 driver, using it from an administrator account, but nothing works.
Question - How do I make this work properly? is there any guide or tutorial anyone can share to setup db2 express c properly.

IIS to SQL Server Error 26, Same connection string works outside of IIS but not from within

I have gone through every checklist I could find for configuring SQL Server I could find. I get the same issue on Windows Server 2008 and Windows 7 Pro. First the environment:
SQL Server Express 2012 --installed as main instance (i.e. no named instances)
IP access turned on
Firewall exception for SQLServer
SQL Server user for application access
Windows Server 2008 service pack 2 (also tested with Windows 7 service pack 1)
IIS 7 (also tested with 7.5 with the same results)
.NET 4.0
Our own database code integrated in a .NET MVC 3 application
We have a tool we developed to import data from the old Ruby on Rails app into the new ASP.NET MVC 3 app. The tool can connect to the database using the user account we created, and that's how I discovered some permissions issues for access to stored procedures. This is the tool we are using to verify the connection works.
Data Source=SERVER_IP,1433;Network Library=DBMSSOCN;Database=MYDB;User ID=webuser;Password=webpassword;multipleactiveresultsets=true;
We are using a straight IP address, but to protect our infrastructure I substituted the IP, username, and password. But this is the structure of the connection string we are using. Following the checklists, I was able to connect from another machine on our network using the import tool to the database and import data. I was also able to import data from the same machine that IIS is installed on.
The same connection string provides the dreaded Error 26 "can't find the database server" message on both Windows Server 2008 and Windows 7 Pro:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I have exhausted every resource I can find, and can't seem to get any closer to an answer. I'm not trying to mount file based database, IIS has read/write access to the web application in any case.
I've ruled out the firewall as a cause for the issue. I've tried the settings with the firewall on and completely turned off. There has to be some other permissions level problem that's happening. Problem is I have no idea what permissions level things I have to check.
After opening a ticket with Microsoft, it turns out I was my own worst enemy. The model classes were set up in their own DLL so I could use them for data migration and other supporting tools for the website.
The DLL was looking in the assembly config for the connection string, and if it wasn't found it would use a reasonable default. Problem is the web application never overrode the location from the Web.config file.
The application couldn't find it because I didn't install the database with the default settings.

Oracle connections from a COM+ application

We have an Oracle 10.2.0 server running. There is a schema on the server called FOO. I have created an ODBC connection to the schema using the 10.2.0 client.
We have a desktop application that has core database access libraries written by ourselves that uese SQLDriverConnect etc.
We also have a COM+ application that makes use of the same core libraries.
When I connect with the desktop application, using the ODBC connection, there are no problems.
Connecting with the COM+ application, I cannot perform any queries. SQLDriverConnect returns SUCCESS but then any attempt to peform a query gives an Oracle error "not connected". The COM+ application is set to run as the "logged in user".
I'm sure this is probably a security issue, but I don't know where to start.
Any ideas?
Thanks.
I found what was causing the problem, it's an Oracle bug.
Cause:
Oracle Bug 4991478; COM application not able to connect when using Oracle10g Client 10.2 if using Neutral Threading or Free-Threaded Marshaller, Fails With ORA-21561 / ORA-00022
Solution:
Install Oracle Client (patch) 10.2.0.3.0.

Resources