connection-string

Separate Read/Write Connection for SubSonic

The security policy at our client's production environment requires that we use separate connection to execute writes and read to and from database. We have decided to use SubSonic to generate our DAL. So I am interested in knowing if it is possible and if yes how? ...

sqlite is given me headache in my C#2.0 windows application

Hello good fellas I'm struggling since this morning about this sqlite thing.after reading some good tutorials i decided to use it as my embedded database in my winform application. i downloaded SQLite-1.0.61.0-setup that install the system.datal.sqlite for me and downloaded the firefox plugin sqlite manager and another management tool ...

"Lost" SQL server database

This is a really strange one. I am using SQL Server Express 2005, and have the following connection string (in a DotNetNuke web.config): Data Source=ELECTROMORPH\S15304561;Integrated Security=True;User Instance=True Note that there is no AttachDbFilename parameter - so I'm not sure how SQL server even knows what to connect to. But it...

Connecting to a access datbase via a Account Name and password.

Hi, I'm trying to use to different methods of connecting to a database to edit data, the declaration below is working: Dim rsConn As ADODB.Connection rsConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _ & Application.StartupPath & "\VFMS_DB.mdb;" _ & "Jet OLEDB:System Database=Security.mdw", "Ads", "1234") but now I want t...

Connection pooling and single sign on

An ASP.NET 3.5 app with SQL Server 2005 must provide single sign on on intranet environment. This is done by using the Windows Authentication mode in the web.config. I want to use connection pooling as much as possible. I also want to use SSPI as database access in the connection string and not using impersonation (in the web.config) T...

How to check for the existence of a DB?

Hello all, 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 ...

How can I change the default connection string settings for VS server explorer

I use SQL Server 2005 express and desing the DB in server explorer in VS2008. Due to various reasons I have disabled user instances. Now every time I use server explorer I need to modify the connection and turn user instances off. Is there a way to configure VS to always connect with user instance = false? ...

Elmah - ASP.NET -> Multiple Connection Strings -> Set SQL Error Log Connection String in Code

I am looking to integrate ELMAH into an existing ASP.NET application to further support error investigations and could use some help with the connection strings. We use a single web.config file for all or our environments the application is deployed in, and at runtime, the app decides which environment it is in, typically based on URL. ...

Login Problem Windows Authentication

Duplicate of: http://stackoverflow.com/questions/881928/windows-authentication-trusted-connection-problem I logged in the Windows Server(Machine 1) as "abc\user1 ". Windows Server machine is in abc domain. MSSQL Server is in the "abc" domain on Machine 1 and have mixed mode.authentication. It has account "abc\user1 " and "abc\user2 ". ...

How do I get the Application Name from either SQL Server connection string or the IIS application name using C#?

Hi All, How do I get the Application Name from an SQL Server connection string in the web.config file. I want to use to log escalated error messages from a web application into the Windows Event Log. Maybe there is a better way of doing this, ie using the IIS/Web application name? Thanks Mark ...

Click-Once - How to encrypt connection strings

I have a WPF application with connections strings stored in the App.config. What is the best way of encrypting these connection strings in a click-once deployment? Thanks ...

How to Read xml spread sheet

Hi All, I have a 3rd Party tool that generates an xml spreadsheet (*.xls). I have another program that reads this spreasheet and processes it. The content of the generated xml spreadsheet is a table with 5 columns and my program runs select queries on them. I m facing an issue while opening a connection to the generated spreadsheet. It s...

.Net Encryption

Similar questions have been asked here, but their answers are not enough to me. What I would like to know is the definite approach to encrypting connection strings in a config file. Here are my questions: Using machine-level encryption, can't anybody accessing my server write a little .Net program to read the contents of the connectio...

Guidance needed ASP.Net app connection string

Net 2.0 / Visual Studio 2005 / ASP.Net web app I read many posts and comments on this site but either some are too confusing to follow for me or others don't meet my requirement. So I have a 3 tier application - UI, BLL, DAL. In my DAL, I created DataSets by draggin storedprocedures from the Server Explorer. So the connection string g...

ClickOnce, SQLExpress and predicting the Name

I have a winform app that will need to install SQLExpress with it. How can I predict what the SQL instance will be called so that my connection strings will all still work. ./SQLEXPRESS? username/SQLEXPRESS? or something else entirely? Thanks! ...

Read an in-memory Excel file (byte array) with ADO.NET?

I want to use ADO.net to extract some data from an Excel file. This process is pretty well documented on the internet. My catch is that my file has been uploaded by a user, and so exists only as a byte array in memory. For security and performance reasons I would rather not write this file to disk. Is there a way of constructing a conne...

Connection String to Connect to .MDF

I've created a new project in VS2008, and added a .MDF file to the project. This is the first time I've tried to use the MDF files and .SQLEXPRESS databases (I've always used extenal Oracle servers in the past). I'm trying to document everything as I go, but I can't figure out what credentials are being used to connect to the .MDF file...

Encrypting connection strings so other devs can't decrypt, but app still has access

I have a database that I want to access via a .NET web application. I can encrypt the connection string in web.config easily enough, but any developer with access to the box can decrypt it with a few lines of code - they have access to the box, so therefore have access to the encryption key stored in machine.config. While I can lock peo...

Why is the scope of a ConnectionString setting always forced to "Application"?

Hi, I'm probably not the first one facing this problem, but I couldn't find a proper answer anywhere. I have a Windows Forms application that uses a strongly-typed DataSet. The designer uses a connection string defined in the application settings. The trouble is that this setting is defined as Application scope (thus read-only), and I ...

sql server query running slow from java

I have a java program that runs a bunch of queries against an sql server database. The first of these, which queries against a view returns about 750k records. I can run the query via sql server management studio, and I get results in about 30 seconds. however, I kicked off the program to run last night. when I checked on it this mor...