Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
Ryan Lundy's user avatar
  • 208k
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? ...
Nourah's user avatar
  • 761
46 votes
1 answer
42k views

SQL Server Connection Strings - dot(".") or "(local)" or "(localdb)"

I've recently had to install SQL Server and restore a database to 2 laptops, the first took me a couple of days to figure out, the second I'm still struggling on. On both I was getting this error ...
Owen's user avatar
  • 4,369
36 votes
2 answers
39k views

Why does an Entity Framework Connection require a metadata property?

I switched my DAL from using LINQ over to Entity Framework. Because my application connects to different databases depending on the current user, I need to dynamically create the DataContext at run ...
John B's user avatar
  • 20.3k
34 votes
2 answers
15k views

What does App=EntityFramework do in Sql connection string?

I have 2 connection strings - 1 local and 1 for my main production server. Entity Framework added App=EntityFramework to my local string when I installed it (4.1) - I'm now on 4.3. What does this do - ...
dotnetnoob's user avatar
  • 11.2k
30 votes
5 answers
105k views

Get Connection String from Web.config in asp.net

I want to know the ways to get connection string from web.config file in asp.net. I just only know the below way . using System; using System.Collections.Generic; using System.Linq; using System....
Ammar Asjad's user avatar
  • 2,960
19 votes
4 answers
9k views

Best practices re sharing IDbConnection or connection string/factory in your .Net code

I'm wondering what would be the best prectice regarding mainataining connections to the database in .Net application (ADO.NET but I guess the practice should be the same for any data layer). Should I ...
Karol Kolenda's user avatar
15 votes
3 answers
15k views

the best way to connect sql server (Windows authentication vs SQL Server authentication) for asp.net app

I have a database and a site having forms authentication. It is working fine with VS2008. This time, I am using "Trusted_connection =True". But when it is opened from outside or directly from browser ...
Brij's user avatar
  • 6,124
13 votes
7 answers
34k views

How to connect to mysql from C# over SSH

How can I connect to a mysql database trough C#, This is my connection string now: connectionString="server=localhost;port=3306;user id=root;Password=*****;database=Data" providerName="MySql.Data....
user123_456's user avatar
  • 5,755
13 votes
3 answers
4k views

Where to put the database sensitive information [duplicate]

Possible Duplicate: How to secure database passwords in PHP? Recently I was given a website project which was supposed to be done in PHP but I don't have much experience in PHP. Anyway, it is up ...
dragon66's user avatar
  • 2,675
12 votes
2 answers
51k views

How to find connection string from a phpMyAdmin database?

I want to connect from java, to a database which i am currently managing from phpMyAdmin. I do not own the server which the database runs. however, i want to find the connection string of that ...
Anonymous's user avatar
  • 193
11 votes
2 answers
20k views

how to change connection string initial catalog

I have a connection string in web config file. I used this connection with name in all my files. connection string is like <add name="connectionname" connectionString="Data Source=DEVELOPER1;...
Vivek Parikh's user avatar
11 votes
2 answers
45k views

How do I connect to SQLite db file from c#?

I am trying to connect to a sqllite db from with a c# application. I have never worked with SQLLite before. var connectionString = @"data source='C:\TestData\StressData.s3db'"; connection ...
Nick's user avatar
  • 19.5k
11 votes
3 answers
8k views

What's best way to secure a database connection string?

I am writing a set of database-driven applications in PHP. These applications will run on a Linux server as its own user. Other users will likely be on the system at times, but have very controlled ...
Chris Kloberdanz's user avatar
10 votes
4 answers
52k views

Classic ASP - SQL Server 2008 Connection String using Windows Authentication

This should be painfully simple, but I cannot come up with a working connection string for a local copy of SQL Server 2008 using Windows Authentication. I've tried using the Data Link Properties tool ...
Nathan Taylor's user avatar
10 votes
4 answers
42k views

.Net PostgreSQL Connection String

I am using PostgreSQL in a project I am working on, and one of the queries is timing out. I need to increase the timeout on the database connection, but since I am using my DAO through a complex ...
Ash's user avatar
  • 25.4k
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)?
tuncalik's user avatar
  • 1,134
9 votes
3 answers
25k views

WPF MVVM Samples with Database

What examples exist of Windows Presentation Foundation (WPF) Model View ViewModel (MVVM) that include sample database connections?
Velu's user avatar
  • 895
8 votes
5 answers
3k views

Prompt for Database Connection String

I would like to offer a database connection prompt to the user. I can build my own, but it would be nice if I can use something that somebody else has already built (maybe something built into Windows ...
Brian's user avatar
  • 37.9k
7 votes
4 answers
2k views

How to configure database connection securely

Similar but not the same: How to securely store database connection details Securely connecting to database within a application Hi all, I have a C# WinForms application connecting to a database ...
chiccodoro's user avatar
  • 14.6k
6 votes
2 answers
14k views

SSH connection to MySQL using SSH.NET library

I was given a link to use this library for connection through SSH connection to a MySQL database with C#. Here is the LINK to the library as a lot of you will find this interesting as you don't need ...
user123_456's user avatar
  • 5,755
6 votes
2 answers
13k views

Determine correct connectionString for web publishing for ASP.NET-MVC application

During development of ASP.NET-MVC application on local machine I used this connectionStringwith no problems whatsoever: <connectionStrings> <add name="DefaultConnection" connectionString=...
Yoda's user avatar
  • 17.9k
6 votes
4 answers
28k views

SQLite Connection not working in C#

I was working with C# Application that manipulates a SQLite Database , Till yesterday It was working fine, It was retrieving records, But since last night, Connection String returns Data Source = ...
DareDevil's user avatar
  • 5,319
6 votes
1 answer
3k views

Is there an Oracle equivalent to SQL Server's Application Name Connection String Parameters?

When connecting to a Sql Server you can include either "App" or "Application Name" in the connection string. This makes is very easy to trace apps that share a username/password. One good use for ...
Chris Weber's user avatar
  • 5,785
6 votes
2 answers
2k views

Can I access sdf (SQL Server Compact database file) kept at some other computer on the same network?

I have done so for SQL Server, now I was trying to do it SQL Server Compact. I am unable to make a connection string in SQL Server Compact which has the provision for providing ip/server.
Amber's user avatar
  • 63
5 votes
8 answers
12k views

How to check for the existence of a DB?

I am wondering if there is an elegant way to check for the existence of a DB? In brief, how do test the connection of a db connection string? Thanks
Martin's user avatar
  • 40.1k
5 votes
2 answers
1k views

Fast database access test from .NET

What would be a very fast way to determine if your connectionstring lets you connect to a database? Normally a connection attempt keeps the user waiting a long time before notifying the attempt was ...
Jorrit Reedijk's user avatar
5 votes
4 answers
5k views

Azure: The context is being used in Code First mode with code that was generated from an EDMX

I have MVC app running fine in local. After updating to Azure, it started throwing the error: The context is being used in Code First mode with code that was generated from an EDMX file for either ...
Krishna Sarma's user avatar
5 votes
3 answers
11k views

How do indicate the SQL default library in an IBM iSeries 2 connection string to an AS/400?

I'm connecting to an AS/400 stored procedure layer using the IBM iSeries Access for Windows package. This provides a .NET DLL with classes similar to those in the System.Data namespace. As such we use ...
gilles27's user avatar
  • 2,231
5 votes
1 answer
3k views

What is the difference between connectionstring and dsn?

I'm having a very hard time deciphering the difference between dsn and connection string. My problem lies is that DS can give you the database name, database driver, name password . Isn't DSN able to ...
Breaz Freind's user avatar
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 ...
opensas's user avatar
  • 62.2k
5 votes
4 answers
2k views

Is it possible to add Data source connection wizard in my app?

Data source connection wizard is very convenient tool. Can I add it to my app to allow user choose data source themself in easy way?
Anton Semenov's user avatar
4 votes
4 answers
5k views

Storing Connection String on Database

I couldn't find a question that would fit this purpose, so I'm asking it. We have deployed an ASP.NET website that has two Connection Strings, one of them can be configured by the user, in runtime. ...
Smur's user avatar
  • 3,103
4 votes
1 answer
9k views

Format of the initialization string does not conform to specification starting at index 165

I keep getting this error: Format of the initialization string does not conform to specification starting at index 165. and I can't seem to find the problem . connection code : <...
Filip Karlsson's user avatar
4 votes
5 answers
1k views

Is it possible to store database connection string information in Active Directory?

Let's say you have many applications in your environment all of which store their connection strings to SQL Server in a web config. Is it possible to have the application retrieve those connection ...
rmontgomery429's user avatar
4 votes
4 answers
7k views

Connection String to Local DB file is not working

connectionString="AttachDbFilename=C:\Documents and Settings\nmartin\My Documents\PS_Upload\TimeTrack\src\TimeTracker\TimeTrack\App_Data\ASPNETDB.MDF;Integrated Security=True; User Instance=True" ...
user avatar
4 votes
2 answers
5k views

Merge aspnetdb.mdf with my own database (automatically generated)

I've searched the internet thoroughly but couldn't find a clear answer to the problem. I have got the aspnet.db database. But i want to add my own tables and data to this database. If i try to connect ...
Cissmayazz's user avatar
  • 2,195
4 votes
1 answer
6k views

DNN Database Error Connection IIS7

So I am moving a DNN7 website from my local computer (the site has been developed in WebMatrix) to a Server running Windows Server 2008. When I run the site I get the error. 'DNN Error Connection To ...
James Michael Lucas's user avatar
4 votes
2 answers
7k views

How to specify Entity Framework Code First connection string in external Enterprise Library config file

I am creating a WPF application, having classical architecture: UI layer, business logic layer and infrastructure layer. I decided to split configuration in two files: app.config file, containing ...
Danil's user avatar
  • 121
4 votes
2 answers
4k views

SQLite data source path strange issue?

The most basic form of a SQLiteConnection string is "data source = ..." I've tried a demo in which I had a SQLite database file called MyData.sdb, this file was placed right in my demo project folder ...
King King's user avatar
  • 62.8k
3 votes
2 answers
2k views

using a SQL database in multiple projects

I have a system comprising 5 applications. Each app accesses a database via a DAL library. In the DAL i have an app.config with the following entry: <connectionStrings> <add name="...
CSharpHolder's user avatar
3 votes
2 answers
43k views

"The ConnectionString property has not been initialized" error in VB.NET

Every time I tried to connect to the database it give me this error "The ConnectionString property has not been initialized" what can I do to solve this? here are my codes Module Module1 ...
CompleteNewb's user avatar
3 votes
1 answer
1k views

Parse to mongoDB atlas connect

I'm trying to change my parse.com connection string to a mongoDB cluster and it giving me: Server returned error on SASL authentication step: Authentication failed. I'm using their Connection ...
Abdoelrhman's user avatar
3 votes
2 answers
2k views

SQLite connection strategies

I have a database that may be on the network drive. There are two things that I want to achieve: When the first user connects to it in read-only mode (he doesn't have a read-write access to the ...
gajo357's user avatar
  • 978
3 votes
2 answers
2k views

How does ServiceConfiguration.cscfg and ServiceDefinition.csdef play with WebConfig in Azure?

I have a big Silverlight app which I have successfully converted and added a CloudService project. I have uploaded the database to SQL Azure, and from my webconfig file with a connection to this ...
Mcad001's user avatar
  • 299
3 votes
1 answer
5k views

Cannot connect to my MongoDB using Compass tool after upgrading from 1.25 to 1.30

I get the below error message when I use a used-to-be working connection string to connect to my Mongo DB on the server. This started happening after I upgraded my Compass from 1.25 v to 1.30 v. I had ...
Abhishek Gupta's user avatar
3 votes
2 answers
1k views

SQL connection string in C#

I read different way of writing of connection string in article http://www.connectionstrings.com/sql-server-2012 Can you please explain me where to use Server and where to use Data Source ? ...
Shailesh Jaiswal's user avatar
3 votes
2 answers
13k views

The connection to the host server failed. Java

I'm trying to run a query but I keep getting this error: The connection to the host server=localhost, named instance sqlexpress failed. Error: "java.net.UnknownHostException: server=localhost". ...
user1028408's user avatar
  • 1,220
3 votes
1 answer
1k views

Using a connection string where the password contains a "@" sign?

When connecting to a database server endpoint, using a connection string format such as the following: mongodb://username:password@server:port/database Is it possible to connect if the password ...
Jonathan's user avatar
  • 32.7k
3 votes
2 answers
229 views

How to connect published Visual C# solution to a different database

So here's the what's up. I just created and "published" a staff management tool in Visual C#. During development, I used a string saved in Properties.Settings.Default to connect to the database I ...
JnBrymn's user avatar
  • 25k

1
2 3 4 5 6