Questions tagged [database-connectivity]
96 questions
185
votes
33 answers
How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?
I can't seem to connect to my database from a site. I get this error:
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
I tried using the local IP address to connect as well as a public one. I've tried:
Yes, the site can…

Damien
- 4,093
- 9
- 39
- 52
115
votes
35 answers
Spring Boot - Error creating bean with name 'dataSource' defined in class path resource
I have Spring Boot web application. It's centered around RESTful approach. All configuration seems in place but for some reason MainController fails to handle request. It results in 404 error. How to fix it?
@Controller
public class MainController…

J.Olufsen
- 13,415
- 44
- 120
- 185
97
votes
11 answers
What's the best way to test SQL Server connection programmatically?
I need to develop a single routine that will be fired each 5 minutes to check if a list of SQL Servers (10 to 12) are up and running.
Is there a way to simply "ping" a SQL Server from C# one with minimal code and sql operational requirements?

backslash17
- 5,300
- 4
- 31
- 46
11
votes
7 answers
MongoParseError: Invalid connection string
I am trying to connect MongoDB database with this code but when running it I get the error (see the error below after the code). The initial error was in the line where it was resolved by adding useNewUrlParser: true but even after this I still get…

Vishwa Sai
- 111
- 1
- 1
- 6
8
votes
2 answers
How to show value printed by sql query in message box
I want to print a value that is returned by SQL Server.
If NOT Exists(SELECT * FROM ItemList WHERE ItemName='txtItemNama')
BEGIN
INSERT INTO ItemList (ItemName) VALUES('txtItemNamea')
END
ELSE
BEGIN
Print 'Duplicate'
…

Shantanu Gupta
- 20,688
- 54
- 182
- 286
5
votes
3 answers
How do I connect & administer an SQL Server database remotely over the Internet?
How do I connect to an SQL Server remotely and administer my database objects? I need to connect to my database located on the web hosting company's server. I have the server name, IP address, my database username & password. I have an installation…

Aravind
- 113
- 2
- 3
- 9
4
votes
2 answers
Got an error reading communication packets in Google Cloud SQL
From 31th March I've got following error in Google Cloud SQL:
Got an error reading communication packets.
I have been using Google Cloud SQL for 2 years, but never faced with such problem.
I'm very worried about it.
This is detail error…

Hui Lin
- 69
- 3
- 5
4
votes
2 answers
QT MySql connectivity using Windows XP, Qt Creator 4.5.2(windows 32 bit)
Platform:
Windows XP
Qt Creator IDE 4.5.2
MySQL is setup here as well.
I want to establish database connection with Qt and MySQL. The following line
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
generates error like below:
QSqlDatabase:…

Samir
- 3,923
- 9
- 36
- 43
3
votes
2 answers
Connecting to SQL Server Express from Visual Studio
I have SQL Server 2008 installed with Visual Studio 2010, I have downloaded a project which has database files created in Visual Studio project itself, now I want to connect to that database.
I tried changing the connection string but unable to…

Abbas
- 4,948
- 31
- 95
- 161
2
votes
1 answer
MongoDB connectivity with PHP dropping after idle time
I'm building a webapp with MongoDB/PHP, and everything's going great... except one thing.
My database connection is flaky. After X amount of time, when I refresh the page I get errors because queries are failing. I check mongod.exe and what I see is…

Kavi Siegel
- 2,964
- 2
- 24
- 33
2
votes
2 answers
Query SQL From Excel 2007 And Return Several Values
I'm attempting to take a small amount of data, about 200 fields in Excel and retreive data from SQL with that field in the where clause for each item.
TABLE:
ID Name Phone
1 Test1 1234
2 Test2 1235
3 Test3 1236
Excel:
Date …

RogueSpear00
- 619
- 2
- 9
- 24
2
votes
3 answers
Extracting data from a database into a text field or text area in Java
I know that we can retrieve text from a text box or text area and then insert the data into a table. How can we do the opposite? That is, how to place all the data back into specific text fields or areas from a database based on some…

Akshay
- 21
- 1
- 1
- 2
2
votes
2 answers
Example php code for connecting and getting a sql stored proceedure
Can any one give
The Example php code for connecting and getting a sql stored proceedure

Linto P D
- 8,839
- 7
- 30
- 39
1
vote
3 answers
Connecting to databases in C# : ArgumentException
I'm running Visual Studio Developer Preview 2011 on a Windows 7 x64 machine.
I'm a beginning to learn C# and am having difficulties connecting to a database. I created a database with MS Access and created a connection by using the Connect to a…

nikhil
- 8,925
- 21
- 62
- 102
1
vote
3 answers
Linux connecting to mysql PHP
I have been trying to connect to mysql all evening using PHP.
I know for a fact the username and password are correct as I have tried 3/4 and I know the permissions are set correctly in the database.
If I remote onto this machine and enter the exact…

Matt Seymour
- 8,880
- 7
- 60
- 101