Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
89 votes
3 answers
272k views

Should I set max pool size in database connection string? What happens if I don't?

This is my database connection string. I did not set max pool size until now. public static string srConnectionString = "server=localhost;database=mydb;uid=sa;pwd=mypw;"; So ...
Furkan Gözükara's user avatar
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 ...
Adam Jenkin's user avatar
  • 4,192
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
34 votes
8 answers
30k views

Get SqlConnection from DbConnection

I have an Extension method on DbContext where I want to do a SqlBulkCopy. Therefore I need a SqlConnection. The connection from the DbContext is from the type DbConnection though. Among a few other ...
Dirk Boer's user avatar
  • 8,923
29 votes
5 answers
20k views

SQL integrated security using computer name instead of user name

I am trying to an SQL Express instance on the same network, authenticating with my domain user. It works just fine with Windows Authentication in SSMS. I verified that I can use the MyDB database, ...
Marcel Popescu's user avatar
22 votes
8 answers
28k views

Display a ConnectionString dialog

I'm trying to create a program in C# that should be able to create, backup and restore a SQL Server database. For this, the user needs to be able to setup a connection string to the desired SQL ...
Christian Tang's user avatar
18 votes
4 answers
202k views

error: the details of the application error from being viewed remotely

I have 2 login pages: Login.aspx-for customer login and xlogin.aspx for admin login i just uploaded my project to the server and all application pages works great but when i log in the admin xlogin....
Olga91's user avatar
  • 207
18 votes
5 answers
41k views

encrypt SQL connectionstring c#

I created an c# application (not asp webpage) which connects to a sql 2005 server. In my sourcecode the password and userid for this sql-server is coded plain text in ConnectionString. SqlConnection ...
Tobi's user avatar
  • 395
16 votes
4 answers
11k views

Connection String Best Practices [closed]

What is the best way to manage connection strings in a web application, from a security standpoint? I've done it several different ways. I've stored them as plain text web.config setting keys. I've ...
Josh Stodola's user avatar
  • 82.2k
14 votes
2 answers
4k views

RSConfig generates a Dsn Connection String doesn't work

TL;DR. Repro steps, take a backup of your C:\Program Files\Microsoft SQL Server\MSRS13.SSRS\Reporting Services\ReportServer\RsReportServer.config Run this command to update the connection string ...
Jeremy Thompson's user avatar
13 votes
5 answers
128k views

How to increase time in web.config for executing sql query

When I am running a query in web application, I'm getting a null value. Same query directly in SQL Management Studio returns results. I think that the problem is a timeout. How can I increase the ...
Jui Test's user avatar
  • 2,399
12 votes
4 answers
93k views

Excel VBA - connect to sql with a trusted connection (no uid/pwd)

Is there a way to have Excel connect to Sql Server using the current user's network windows authentication (trusted connection/integrated security)? I don't want to rely on a sql login or have a uid/...
notnot's user avatar
  • 4,612
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....
Batuhan Avlayan's user avatar
9 votes
6 answers
25k views

'MultipleActiveResultsSets' Keyword Not Supported

I am trying to read from an SQL Server database which is hosted on MS Azure, through an ASP.NET WebForms website created in Visual Studio 2013. I've stored the Connection String in Web.Config, and ...
user7554035's user avatar
9 votes
3 answers
68k views

Cannot connect to database using localhost\sqlserver

I know we should be aware of such phrases but all of a sudden all my connections to localhost\sqlexpress stopped working. As .\sqlexpress and (local)\sqlexpress work, this wouldn't be a big deal if ...
Wullie's user avatar
  • 155
8 votes
1 answer
5k views

EF 5.0 & dynamic connection string?

One thing is driving me crazy right now. My (Database-first) EF-Model needs a dynamic connection string (IP-Adress of Server might change once in a while). So in older EF-Versions you could pass a ...
Mr. Muh's user avatar
  • 649
6 votes
2 answers
2k views

ASP.Net MVC3 SQL Connection String

I am creating an app on APPHARBOR and I have an entity model for querying the SQL server. The following String is givving me error: <add name="TraxzDBEntities" connectionString="...
Aziz's user avatar
  • 1,604
6 votes
2 answers
573 views

cannot open database - requested by the login - why can't I connect to my DB?

I'm trying to insert some data into my DB (Microsoft SQL Server) My connection does not open and I get this message: Cannot open database \"[Sales and Inventory System]\" requested by the login. ...
user avatar
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
4 answers
29k views

ASP.NET ConnectionString AttachDbFilename=|DataDirectory|

This is about ConnectionStrings / ASP.NET MVC with Visual Studio 2012 ultimate & SQL Server Express 2012. Following up with this tutorial here: http://www.asp.net/mvc/tutorials/mvc-4/getting-...
Alaa's user avatar
  • 403
5 votes
2 answers
8k views

MSOLEDBSQL Causes Error 3706: Provider Cannot Be Found

A client has for many years been using an Excel VBA application to interact with a SQL database. Recently the database has been upgraded from TLS 1.0 to TLS 1.2, which caused the connection from VBA ...
BDra's user avatar
  • 486
5 votes
3 answers
22k views

The 'Microsoft.ACE.OLEDB.14.0' provider is not registered on the local machine

Iam using ms access as a database .mdb file how to get the ms access drivers 2007 . i got the error :The 'Microsoft.ACE.OLEDB.14.0' provider is not registered on the local machine.
surya narayana raju g's user avatar
5 votes
4 answers
8k views

Connection Lifetime=0 in MySql connection string

What exactly does Connection Lifetime=0 mean in a connection string?
Quintin Par's user avatar
  • 16.2k
5 votes
2 answers
10k views

connection string for remote database server

I have 2 servers setup at the moment. One is a web server running Win Server 08 and the other is a database server running SQL Server 08 on Win Server 08. Currently I have my site setup so that it ...
Richard Reddy's user avatar
5 votes
2 answers
11k views

ArgumentException: Keyword not supported: 'server'

I have an Asp.net MVC5 application and have published it to Microsoft Azure. I first migrated my .mdf files toSql Azure Databases. The database connection string provided in the Azure Portal is not ...
Nauman Zafar's user avatar
  • 1,103
5 votes
3 answers
21k views

CREATE DATABASE permission denied in database 'master'. Cannot attach the file 'C:\co\App_Data\xxx.mdf' as database 'xxx'

I have a problem with attaching the database with information about users. I'm trying to move the asp.net mvc4 project to the IIS. MS SQL Server 2008 Express. <add name="DefaultConnection" ...
mistique's user avatar
  • 111
4 votes
5 answers
33k views

What is the connection string for odbc connections?

I've always done web apps and now I need to do a console app. I need to use both an odbc connection and a regular connection. In the past I would have used: <add name="LinkConnectionString" ...
rksprst's user avatar
  • 6,591
4 votes
8 answers
3k views

How to vary connection string for different work locations

I am working on a C# 4.0, WPF 4.0, SQL 2008 project and I do work at home and in the office. I just setup SubVersion using Visual SVN per the recommendations found in other questions. The problem I am ...
Mike B's user avatar
  • 2,652
4 votes
1 answer
3k views

ConnectionString in app.Config not working

In my winform project I have a connection string to connect to SQL. I have this connection in app.config file like this; <connectionStrings> <add name="MyConnectionString" providerName="...
hi itsme's user avatar
  • 441
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 ...
Marquis Blount's user avatar
4 votes
1 answer
4k views

ADO - how to select column from xls file where two or more columns have the same name?

I have an excel file like this: | | A | B | C | D | | 1 | Name 1 | Name 2 | Name 3 | Name 2 | | 2 | Data | Data | Data | Data | | 3 | Data | Data | Data | ...
Wodzu's user avatar
  • 6,959
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; ...
Laziale's user avatar
  • 8,175
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
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
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 ...
Piero Alberto's user avatar
3 votes
1 answer
8k views

Enabling Multiple Active Result Sets(MARS) in Entity Framework by connection string

I try to enable MARS(Multiple Active Result Sets) in ASP .NET MVC 5 web applications which uses Entity Framework. I tried to add MultipleActiveResultSets=True to my connection string: <...
Yoda's user avatar
  • 17.9k
3 votes
4 answers
314 views

SQL Server 2008 and Connection String

I have created a login in SQL Server 2008 with username= smart_provider and password = password. Now, I added the following connection string to my project: <add name="DB_Connection" ...
Matthew's user avatar
  • 4,537
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
4 answers
2k views

Store the ConnectionString

Hi i am trying to find the best way (or a good one) to store a ConnectionString (my App will connect to a Database in a Server, it will work with it continuosly) and how to handle with the Admin ...
Miguel's user avatar
  • 937
3 votes
3 answers
4k views

SQL Server does not exist or access denied (intermittently)

I use a Microsoft Access 2010 front end with linked tables on an SQL Server 2012 installation. Local network. When Access Starts, a VBA script runs which connects to the SQL server and performs some ...
GRY's user avatar
  • 724
3 votes
1 answer
1k views

SqlConnection object in DLL throwing "Keyword not supported" exception on instantiation

I wrote a .dll that is to be used to connect to a SQL database. The code works fine when it was simply a class file in another Visual Studio project. However, now that I am attempting to use it as a ....
NealR's user avatar
  • 10.5k
3 votes
2 answers
2k views

Get Number of open connection string in my application

I'm programming an application with C# and SQL Server 2008. How can I get the number of opened connections that are not already closed? Also if I open a connection with 20 minute timeout, and do not ...
DooDoo's user avatar
  • 13.2k
3 votes
2 answers
24k views

connection string with no user name and password, asp.net

i have a website built in asp.net connecting to a sql 2000 db. within my web.config file, i have a connection string referencing a DSN. in order for my db connection to work i have to include the ...
MG.'s user avatar
  • 883
3 votes
1 answer
2k views

multiple connections to an mdf file

im creating a .Net application using c# for a university project and need some help! I have a mdf file hosted on a network drive and need several clients to be able to access this database from their ...
Connor Gervin's user avatar
3 votes
2 answers
7k views

SQL Server Express connection string / FluentNHibernate

I'm having some issues with my connection string. I've been testing a lot of different strings and approaches and now I'm stuck. private static void InitializeSessionFactory() { _sessionFactory =...
aLoveForCoffee's user avatar
3 votes
3 answers
13k views

System.InvalidOperationException: 'The ConnectionString property has not been initialized.' - C#

The code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; ...
Richard Johnson's user avatar
3 votes
2 answers
946 views

The server tag is not well formed. QueryString and DataBinding

I've done a ton of research but with no luck finding a way to resolve this. <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" DataSourceID="...
user3779804's user avatar
3 votes
1 answer
2k views

How to deploy an SQL Compact Edition database file (.sdf) in the AppData folder? Connection string?

I'm planning to deploy my DB file in the Users\CurrentUserName\AppData folder, because default User Account Control settings restrict write access to the Program Files directory where my program is ...
lucian's user avatar
  • 201
3 votes
1 answer
82k views

vb6 ADODB connection string to sql server 2008

I recently migrated a database from sql server 2005 to 2008 on windows server 2008. Clients connect fine from their XP machines and so does the SQL Management Studio 2008. I have also tested a ...
phill's user avatar
  • 13.7k
3 votes
2 answers
3k views

How to merge two databases on two different servers?

I have two different databases, the client one is attached from a .MDF file to a .\SQLEXPRESS server. The master one is running on a server on another computer called COMPUTER_NAME. I want to merge ...
Charles Clayton's user avatar

1
2 3 4 5
8