All Questions
Tagged with connection-string database-connection
403
questions
105
votes
3
answers
216k
views
What is the point of "Initial Catalog" in a SQL Server connection string?
Every SQL Server connection string I ever see looks something like this:
Data Source=MyLocalSqlServerInstance;Initial Catalog=My Nifty Database;
Integrated Security=SSPI;
Do I need the Initial ...
73
votes
2
answers
117k
views
Persist Security Info Property=true and Persist Security Info Property=false
For the properties:
Persist Security Info=true
and
Persist Security Info=false
Can you tell me what is the difference between them, and if I don't put it in my connection what will happen?
...
65
votes
18
answers
471k
views
How to fix "The ConnectionString property has not been initialized"
When I start my application I get: The ConnectionString property has not been initialized.
Web.config:
<connectionStrings>
<add name="MyDB"
connectionString="Data ...
57
votes
4
answers
106k
views
Quick ways to test OLE DB Connection String
For debugging purpose I'd like to know ways to test OLE DB connection string quickly.
I've found this free software, it works on my machine, tested successfully.
Is there a even quicker way to do so,...
54
votes
1
answer
260k
views
A network-related or instance-specific error occurred while establishing a connection to SQL Server [closed]
I deployed my asp.net web application on somee.com, whenever I login into this site (ipc.somee.com) it gives me a network related error like:
A network-related or instance-specific error occurred ...
50
votes
7
answers
72k
views
SQL Express connection string: mdf file location relative to application location
I am using SQL Express databases as part of a unit test project in c#. My databases is located here:
./Databases/MyUnitTestDB.mdf
I would like to use a relative path or variable in the app.config ...
26
votes
7
answers
147k
views
Connection string - Keyword not supported: 'initial catalog'
I am using Webmatrix.data's Database entity to create a database connection, however it doesnt like my connection string. I am running it from MVC ASP.net.
Ive tried changing it to server / database,...
23
votes
3
answers
64k
views
Connecting to local instance of PostgreSql with JDBC
I have a running local instance of PostgreSql on a linux machine. When I use psql command from the shell I success to log in without any problem. I need to connect to the PostgreSql via the JDBC, but ...
22
votes
9
answers
75k
views
How to change connection string in DataSet.xsd?
I have build my project in C#, I add DataSet.xsd, and connect him to
Oracle DataBase in my computer - work Excellent !!!!
When I installed on the customer computer (that connect to his Oracle ...
19
votes
2
answers
19k
views
unable to retrieve metadata for unrecognized element providers
I get a message error whenever I try to add a controller with Entity framework template but I keep getting a error message
unable to retrieve metadata for 'path' unrecognized element providers.
...
16
votes
5
answers
13k
views
Is there a need to secure connection string in web.config?
So I am using connection strings in my web.config using SQL authentication.
Of course people say this could be a vulnerability as you are storing password in plaintext.
However, from what I know, ...
14
votes
4
answers
19k
views
Specifying Port With SqlConnectionStringBuilder?
I've ran into a snag. I have a need to specify the port number for my local installation of SQL Server 2008 R2. So far I've tried using the SqlConnectionStringBuilder with the data source set as .\...
13
votes
4
answers
10k
views
winforms connection properties dialog for configuration string
Is there a way to display the connection properties dialog for connection string browsing(for database) in run time?
As I want the user to be able to connect to various database using the GUI.
The ...
13
votes
3
answers
2k
views
What is the best way to centralize and secure connection strings?
What is the best way to centralize and secure the connections strings used by applications? In my environment we have many internal applications. Each application requires one or more connection ...
12
votes
4
answers
27k
views
Error occurred during the pre-login handshake
Please read in the entirety before marking this as duplicate.
In a project that I am debugging I receive a SqlException saying the following:
Additional information: A connection was successfully ...
12
votes
3
answers
74k
views
Sql developer custom connection string
How to use custom connection string in Oracle sql developer to connect?
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=147.22.109.218)(port=1521))(ADDRESS=(PROTOCOL=TCP)
(...
11
votes
3
answers
31k
views
How do I solve "Keyword not supported: 'metadata' "?
I can't connect to SQL Server and connection string of my project is:
<add name="Teleport_DEVEntities" connectionString="metadata=res://*/Data.Model.AdvertisingModel.csdl|res://*/Data.Model....
11
votes
3
answers
34k
views
OracleConnection.Open is throwing ORA-12541 TNS no listener
So I am connecting to an external server through C#. I just installed Oracle 11g client on my machine from here: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html (255MB ...
11
votes
2
answers
4k
views
Entity Framework Core connect to MSSQL database over SSH tunnel
I've seen a lot of posts asking similar questions, but none of which solved the issue I have.
My setup is as follows:
Remote host with database: reachable on 127.0.0.1:1433
SSH tunneling: L5000 ->...
10
votes
5
answers
12k
views
How can I safely store and access connection string details?
I'm currently working on a ASP.NET MVC web site, and I've come up to a point where I need to integrate a database into the website.
Normally I would simply add the appropriate connection string to ...
10
votes
2
answers
4k
views
Entity Framework 6 Programmatically Connect to Postgres
I'm working on programmatically establishing a connection to PostgresSQL using Entity Framework 6. I have this class:
public class ClearspanDatabaseContext : DbContext
with this constructor:
public ...
10
votes
3
answers
95k
views
How to get SID, Service Name and Port for Oracle database?
I have oracle database running on address xx.xx.xx.xx
I know login, password and initial catalog
I am trying to set up new connection in Oracle SQL Developer so I can access this database to take a ...
10
votes
3
answers
1k
views
Can't connect to SQL LocalDB from Windows Service, WPF app & SSMS work fine?
Having some trouble with a system I'm developing. The layout as far as this question is concerned is a WiX built msi installer which installs SQL LocalDB 2012, a WPF app, and a Windows Service. Both ...
9
votes
3
answers
5k
views
How can I get the connection string for an SQL Express database listed in LINQPad?
Is there an easy way to get the connection string of a database listed in the connection window of LINQPad (other than using the object explorer of Visual Studio)?
9
votes
2
answers
110k
views
How to fix "'ServerVersion' threw an exception of type 'System.InvalidOperationException'"? [duplicate]
I have got a local SQL Server DB, up and running, and I am trying to connect to it in a seemingly failproof way:
new SqlConnection(@"Server=(localdb)\v12.0;Integrated Security=true;Database=MyDBName;...
8
votes
2
answers
64k
views
ConfigurationManager.ConnectionStrings.ConnectionString Issue
I am trying to pull in data from a Microsoft Access database file, in order to populate several textboxes. (The textboxes are all done in XAML.) I'm quite sure I'm missing something, because the ...
7
votes
1
answer
14k
views
Set DSN encoding for ODBC Driver 11 for SQL Server on Windows 10
TL;TR
How force this ODBC driver to encode in UTF-8?
Detailed description
I'm writing PHP 5. 5. application which connects to database Microsoft SQL Server 2014 via PDO using ODBC driver. More ...
7
votes
0
answers
2k
views
I can't make the sqljdbc work with AD username/password
I need to connect to High Availability (HA) / Desaster Recovery (DR), also known as HADR, enabled SQL server 2012 using AD account from Java on Linux.
integratedSecurity is not an option since it ...
6
votes
2
answers
42k
views
Reading from the stream has failed - MySqlException
I'm trying to open a connection to a MySql database using the following code piece:
string connectionString = "Server=ip_number;Database=database_name;Uid=uid;Password=password";
MySqlConnection ...
6
votes
4
answers
23k
views
The configuration section 'connectionStrings' cannot be read because it is missing a section declaration
I am trying to move my webpage(c#) to ISS 7.5 server.
I have read that i need to put the in WEBCONFIG to achieve the conection with sql server 2008.
I already did that.
Here is my WEBCONFIG
<?...
5
votes
2
answers
7k
views
LINQPad - Connection String to my Oracle DB
I just started using LINQPad and all works great when connecting to my SQL Server DB, but now I'm trying to set up a second connection to my Oracle DB and I'm getting stuck as to how to do it.
I ...
5
votes
2
answers
14k
views
Connection string for default instance like for named instance
In my .NET application I am connecting to Microsoft SQL Server 2005 or 2008 database. User selects instance which the application shows it and then application should do something with this instance. ...
5
votes
4
answers
2k
views
Java newbie needs help in database connection
I'm new to Java and even newer to java database connections. I've managed to create a database connection and query a table when I put it in the Main class. Now that I've moved it into a new class ...
5
votes
6
answers
687
views
Why do we need connection strings?
When we connect to a database in ASP.NET you must specify the appropriate connection string. However most other instances where data is to be specified is done within an object.
For example why ...
5
votes
1
answer
3k
views
where to store database string connection in java web app?
I'm about to begin my first project with java
Let me tell how I used to handle these things...
So far now, I've been workin on asp with a com+ componente made with VB6.
The component is registered ...
5
votes
3
answers
7k
views
Change Connection String at Runtime in EF 6
I mostly use my dbcontext with using statements like this:
using (var context = new MyContext())
{
}
But I later had to add a project with a function to change the database. I found out that I could ...
5
votes
4
answers
19k
views
SQL Express connection string hell ASP.Net
SQL Express 2005 is running locally. I have a project written by another person running on the same machine. All I want to do is connect to it, can't be that hard right?
This is the one I use in my ...
4
votes
3
answers
21k
views
Two hosts in jdbc url
We are using jdbc url like jdbc:mysql://localhost:3306/mysql. How could I set second mysql host in this url? If this is imposible, how could I set in my java application (hibernate) connection to ...
4
votes
2
answers
6k
views
Get Connection String Without Password Value in C#
I try create method for get the connection string value but without value for password, or show password like * character. I need used it in logging.
I use ConnectionStringBuilder for Oracle, ...
4
votes
5
answers
10k
views
How do I connect to SQL Server with VB?
I'm trying to connect to a SQL server from VB. The SQL server is across the network uses my windows login for authentication.
I can access the server using the following python code:
import odbc
...
4
votes
6
answers
19k
views
pyodbc connection string sql server authentication
I know this question has been asked many times on the web resulting in many different solutions none which have worked for me.
For my scenario I'm attempting to do a simple connection to a MS Sql ...
4
votes
2
answers
7k
views
ibmda 400.1 provider is not registered in local machhine
I am trying to connect to AS400 database from c#.net. Am getting this exception "ibmda400.1 provider is not registered in local machhine", How to resolve this ?
This is my connection string and am ...
4
votes
1
answer
39k
views
Connection string for a remote SQL server
I am trying to connect to a remote SQL server. I would like to know the proper way to connect to the server. TCP/IP protocol is enabled. I am trying this way:
@"Server=myserver.com\SQLEXPRESS; ...
4
votes
1
answer
3k
views
How to define a connection string to create local database in the current folder?
My current connection string is:
<connectionStrings>
<add name="myConnectionString"
connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=CapacityDatabase.mdf;...
4
votes
1
answer
4k
views
Python Connect to Oracle DB
I currently use PYODBC to connect to MS SQL Server and MYSQL, but now need to access an Oracle database as well.
I have Oracle SQL Developer installed on my work comp (but there doesn't seem to be ...
4
votes
1
answer
4k
views
Changing ASP.NET Website Administration Tool Connection String
I've created user roles with Asp.net website administration tool. I want to store these user roles in my table which are stored in SQL server. But the tool has created default connection string and ...
4
votes
2
answers
5k
views
CREATE DATABASE permission denied in database 'master'. error in MVC 4 application
After deploying my MVC 4 application, I try to register user, get such error:
CREATE DATABASE permission denied in database 'master'.
Connection string is :
<add name="Market" providerName="...
4
votes
0
answers
1k
views
Service throws "The underlying provider failed on Open" error randomly
I have a singular issue with my Entity Framework code. I have a service; very night, it makes some update operations on my database. Sometimes, it seems almost randomly, it return the error:
The ...
4
votes
1
answer
3k
views
Location of Microsoft access database for windows form when creating setup file using installshield
I have developed windows form which uses Microsoft Access Database.
During development i have put database file in root folder with in project.
When i run application through visual studio, it run ...
3
votes
2
answers
12k
views
Storing Password in SSIS Package
I have an SSIS Package which is used to connect Oracle. I used the Oracle Provider for OLEDB connection manager in SSIS. I have specified my server name, user name and password, selected the check ...