connection-string

Deploy a LINQ to SQL Library using different SQL users

Thanks to this website I succeed to use a connectionString localized inside a web.config instead of the one provided in the app.config of the library. But my production and my test SQL Server do not have the same SQL user name. Table(Name="SqlUserName.tableName")] public partial class tableName : INotifyPropertyChanging, INotifyProperty...

How do I tell when there are too many SQL connections?

I am creating a website that I want to offer as a service. Each customer will have their own database, and each site requires two databases. If I have 100 active customers and they are all working in their sites, I could have 200 distinct connection strings. How do I find out how many is too many? I don't want to wait until I encounter...

ASP.NET System.Data.EntityClient connection string help.

Hello, I'm running ASP.NET MVC on a shared server and I'm having problems connecting to SQL via System.Data.EntityClient. Below is the connection string that my hosing provider gave me to connect to SQL and the one that VS configured for my local machine during development, what should my connection string look like when I deploy to the...

Dynamic Connection Strings for Strongly Typed DataSet in a Class Library using App.Config

This is my first question on StackOverflow.com and I'm not sure if this is the correct way to do this. I found a similar question titled: Modifying the Data Source for the Strongly Typed Dataset Connection String. However, the answer provided is not working for me. I'm not able to comment on it because I don't have enough "reputation poi...

Accessing Connection Strings via a Web Service

The idea of storing connection strings in a data base is a perverse idea, but please hear me out first. We all know that it’s best practice to encrypt connection strings in the web.config file, but what if we just skip the web.config file completely? A couple of months ago I was asked to move databases from one server to another. This m...

Connection string for a L2E web app

We have a class library (ProjA) which has L2E object context. This will be used in an Website (ProjB) and WCF Service (ProjC). How do I specify the connection string in the website (ProjB) web.config so that it uses the resource files from the class library project (ProjA). connectionString="metadata=res://*/db.csdl|res://*/db.ssdl|res:...

Changing the connection string for a Typed Data Set

I created a typed data set in one project, and moved it to another. The orginal connectionstring it created in the settings file was something like "myconnectionstring2". When I moved it to the new project I went into the project settings file and created a connection string called "myconnectionstring". I'm trying to get the typed datase...

How do I programmatically tell if a client machine has the Microsoft.Jet.OLEDB.4.0 as a valid provider?

I need to export data into an Access database. My code works, but it works with the assumption the client machine has the Microsoft.Jet.OLEDB.4.0 as a valid provider. I want to test to see if this is true or not, in code. My problem is that I don't have the location of an existing access database and I don't want to create a new .mdb ...

SubSonic deployment and changing connectionstrings

I used Subsonic to build the DAL for one of my web applications. When I move it from my test server to the production server I change the connectionstring to point to the production datasource but the app still runs against the test DB. Is the connection information stored someplace else in addition to the Web.config? What are the best...

Oracle: what is the "instantclient" connection string format?

and how does it differ from the regular connection string? update: name/pass@//host:1521/instance ...

What's a good resource for grokking database connection strings?

Often the most frustrating thing in starting a new database project or learning a new database is figuring out the magic incantation known as the "connection string". Where are the good resources for understanding each database's connection string format? ...

How to connect to DB on SERVER for Asp.Net membership?

I've just upload my ASPNETDB.mdf using "Generate Scripts" into server. The problem is, I don't know how can I connect to it for my Membership.(e.g LogIn Controls) where is the ConnectionString? ...

Reusable Components, database connections and different environments

I am wondering what would be considered best practice when setting up reusable components / libraries in .net. I have a webservice that utilizes a library that contains a few database connection for interacting with databases. I am wondering how I should set my library up when it comes to specifying the connection strings. I need to be...

Connecting to a Database with WinAuth

Hello, In response to a question I asked about a week ago I changed our database engine to only accept Windows Authentication instead of SQL Authentication. Because our code runs in a different user context then that of the database connection we need to specify the username and password information in order for us to connect to the dat...

NHibernate ASP.NET and Encrypted Connection strings Error

I get an error: Format of the initialization string does not conform to specification starting at index 0 in teh nhibernate config section of the web.config I have this set to use the named connection string: MyConnectionString And when I try it I get an error, now this worked fine with unencrypted connection string, I thought it would...

how to create a dll linked to access db with encrypted connection strings in c# 3.0?

hi guys, i'm a totally newbie when it comes to the world of .net. but what i'm trying to do here is to create a dll with some public functions which can be called by another program to access some data inside an password protected access database. for now i'm keeping the password in the connection string and using the code below to en...

Connecting to SQL CE db using SQLConnection

Pretty straightforward question. I'm building an app which reads data from a SQL Server 2005 instance. I wanted to run some tests on my laptop (which does not have SQL 2005) so I was looking at swapping in a local database for the purpose of the tests. I'm using VS2008 so the Compact Edition DB seemed a natural choice. I had hoped to j...

Why does Sql Server connection TimesOut

Hi I am using Enterprise Library Data for my Sql database. I am using version 3.1. I am using this code to execute a long running sp (about 1 min). Dim db As SqlDatabase = New SqlDatabase(System.Web.Configuration.WebConfigurationManager.ConnectionStrings("portalConnection").ConnectionString) db.ExecuteNonQuery("spna...

Is there a standard way to deploy an application with SQL Server express?

In Winforms or WPF Is there a standard way to deploy an application with SQL Server express? Is there a standard way to create a local SQL Server express database and also update the app.config connectionStrings settings during an application install? ...

Oracle connection string without tnsnames.ora file

I am using the .NET framework with the System.Data.OracleClient namespace. I have the oracle 11 client installed on my computer. I do not want to use the tnsnames.ora file to store connection information. Could someone please tell me what the connection string would look like if I did not want to use the tnsnames.ora file? I will be ...