getting ODBC Sql Sever Driver DBNETLIB Invalid Connection error - vb.net

i am working on vb.net windows application, it included vb6 reporting application exe also,for this application i am using SQL Server,In my working system it is working good. I have installed EXE in client system ,Some times in some systems i am getting this error like :
[Microsoft][ODBC SQL Server Driver][DBNETLIB] Invalid connection
any one please give me the suggestion on what i have to do.

Related

Making a SQL Server connection in Visual Studio 2008 for smart device application

I am tyring to create a scanner application and this requires going into my database and fetching a upc code. However I don't know how to accomplish this in visual studio. Essentially when a person clicks a button a database connection should open from the smart device which will allow the user to see the price of an item. However I was struggling trying to create a a database connection so I tried doing it by my odbc driver which is how I use it for my access programs. This worked and I can see all my tables on my server explorer. However I don't know if I have to explicitly establish a connection pragmatically as well in order to run a select statement....
I forgot to mention I decided to go with an ODBC connection because when I tried sing Microsoft Sql Server (SQLCLient) I got an error saying "The server version is not supported only servers up to Microsoft Sql Server 2005 are supported"
So I decided to go with the odbc driver but I don't even know if using an odbc driver will work while using the application on the scanner device
I haven't programming with VS nor vb.net so this is all pretty new to me, so any pointers at all help

Error while installing database engine service with SQL Server 2017

I get the error:
Object reference not set to an instance of an object
while I am installing the SQL Server 2017 database engine service.
In previous tabs, only the windows firewall gives warning, but I already have made rule for port 1433. In SSMS, when I try to connect with database engine, it causes a login failed error (Error 18456, state:1).
I have already tried reinstalling and also tried to use .net framework repair tool, but that didn't help.
Also I found that interesting thing that I do not have problem with connecting to analyses services in SSMS.

SQL server & Visual Studio

I need help with SQL server in visual studio. I can't seem to connect my visual studio with internal SQL server. I had created a database with visual studio earlier and it was working fine but now i'm getting an error saying:
The attempt to attach to the database failed with the following
information: 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: 50 - Local Database Runtime
error occurred. Cannot create an automatic instance. See the Windows
Application event log for error details.
I have tried to create a new database file in a new project but then i get the error:
A network related or instance specific error occurred while
establishing a connection. The server was not found or was not
accessible. (Provider:Named Pipes Provider, error:40- could not open a
connection to SQL server.
I have tried different things but can't seem to get the hang of the problem. I reinstalled visual studio too but that didn't work either. what can i do to get rid of this error and get my database back online?
If you are running Visual Studio on your local machine, you have not any problem with firewalls and enabling of TCP/IP.
Try this four solutions may fix your problem:
SQL Server Express LocalDB add-on, get it from this link.
Make sure that your SQL service is running.
Use SQL Server Authentication.
Make sure you have typed .\sqlexpress in Server name in Add Connection window. You should use a backslash \ as the separator, not a forward slash.

Error 26 on SQL Server 2008

I have prepared a program with Visual Basic 2010 and I am using a SQL Server 2008 database. (service based database) it works properly. But sometimes (when I don't use computer for a period like 2 hours) I try to start my program on VB (F5), it waits, and then gives this error:
A network-related or instance-specific error occured while
establishing a connection to SQL Server. The server was not found or
is not accesible. Verify that the instance name is correct and that
SQL Server name is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance
Specified.)
I have googled it, but nothing helps. I'm afraid this error will be a problem when the user uses the program. How might I solve this?
Probably the network connection turn off after some time. Check System Operating power setting's option
The same issue I faced and got resolved by trying this - in run type services.msc:
the services window will pop up
in that SQL Server(SQLEXPRESS) start this service.
make sure SQL Browser service is running.

Windows 7 64 Bit - ODBC32 - Legacy App Problem

Good day StackOverFlowlers,
I´m a little stuck (really stuck) with an issue with a legacy application on my organization.
I have a Windows 7 Enterprise 64 Bit machine, Access 2000 Installed and the Legacy App (Is built with something like VB but older) The App uses System ODBC in order to connect to a SQL 2000 DataBase on a Remote Server.
I created the ODCB using C:\Windows\SysWOW64\odbcad32.exe app in order to create a System DSN. I did not use the Windows 7 because it is not visible to the Legacy App.
I tested the ODBC connection with Access and worked ok, I can access the remote database.
Then I run the legacy App as Administrator and the App can see the ODBC, but I´m getting errors on credential validation and I´m getting this error:
DIAG [08001] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]SQL Server does not exist or access denied. (17)
DIAG [01000] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]ConnectionOpen (Connect()). (53)
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)
I use Trusted Connection on the ODBC in order to validate the user by Domain Controller.
I think that the credentials are not being sent by the Legacy App to the ODBC, or something like that. I don´t have the source code of the Legacy App in order to debug the connection.
Also, I turned off the Firewall.
Any ideas??
Thanks in advance!
When you run it as administrator is it your same account elevated or is it a second account all together?
Try running Access 2000 under that same method and see if it can still access the database. You can also check the SQL server logs to see who the app is trying to authenticate as. This should help you identity where to start looking.