A database connection is a facility that allows client software to communicate with database server software, whether on the same machine or not. A connection is required to send commands and receive answers.
12
votes
1answer
8k views
ExecuteReader requires an open and available Connection. The connection's current state is Connecting
When attempting to connect to MSSQL database via ASP.NET online, I will get the following when two or more people connect simultaneously:
ExecuteReader requires an open and available Connection. ...
52
votes
16answers
73k views
The underlying provider failed on Open
I was using .mdf for connect to DB and entityClient. Now I want to change the connection string so that there will be no .mdf
Is this connectionString correct
<connectionStrings>
...
10
votes
5answers
13k views
SQL Express Connection string - Relative to application location
I am using a SQL express databases as part of a unit test project in c#.
My databases is located in ./Databases/MyUnitTestDB.mdf
I would like to use a relative path or variable in the app.config ...
3
votes
5answers
16k views
How to connect Android to a database server
Is there any sample? I have my android application and I need to connect to mysql server on my machine, what is the best way?
I should not use jdbc, explanation here
Best way to implement Client ...
5
votes
5answers
39k views
How do I change a Crystal Report's ODBC database connection at runtime?
I have a report made with Crystal Reports 2008 that I need to deploy a production system which means that I need to be able to change the database connection at runtime. The database is PostgreSQL ...
4
votes
1answer
5k views
“Cannot open user default database. Login failed.” after installing SQL Server Management Studio Express
I have a database in a local file that is used by a program. The program has limited functionality and I needed to run some quick queries. I installed SQL Server Management Studio Express 2005 ...
2
votes
3answers
909 views
When my app loses connection, how should I try to recover?
I have an app that I'm connecting to a mysql database and it loses connection in the middle of the night and then spouts about null connections and JDBC hasn't received messages in X seconds.
I call ...
18
votes
5answers
22k views
Closing Database Connections in Java
I am getting a little confused, I was reading the below from http://en.wikipedia.org/wiki/Java_Database_Connectivity
Connection conn = DriverManager.getConnection(
"jdbc:somejdbcvendor:other ...
13
votes
7answers
8k views
How to force a SqlConnection to physically close, while using connection pooling?
I understand that if I instantiate a SqlConnection object, I am really grabbing a connection from a connection pool. When I call Open(), it will open the connection. If I call the Close() or ...
14
votes
3answers
7k views
Why always close Database connection?
Connecting to database consumes a lot of resources right (or not)?
So, why always close a database connection in your application if you have to open it again?
Can I just make this connection ...
13
votes
5answers
13k views
Best Portable way to connect to SQL server using c++
I want to connect my program which uses C/C++ to a SQL Server database (Express or Standard edition). Because of users' demands, the program will have to be ported to Mac OS too, so the database ...
12
votes
1answer
18k views
Enable tcp\ip remote connections to sql server express already installed database with code or script(query)
I am deploying sql express with my application. I will like that database engine to accept remote connections. I know how to configure that manual by launching the sql server configuration manager, ...
8
votes
8answers
29k views
Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
I am running a Rails app so now I am trying to remote connect to mysql and I am getting this error
Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system ...
1
vote
1answer
736 views
can I access a remote mysql server/db from a stored procedure?
Is it possible to connect to a remote instance of mysql server from a stored procedure using sql statements, for select and insert access?
Ideally, it would be something like (pseudo-code):
connect ...
62
votes
3answers
33k views
What “exec sp_reset_connection” shown in Sql Profiler means?
Trying to understand what Sql Profiler means by emitting "sp_reset_connection".
I have the following, "exec sp_reset_connection" line followed by BatchStarting and Completed,
RPC:Completed ...