connection-string

Connection string for Informix for .NET

时光总嘲笑我的痴心妄想 提交于 2020-01-01 19:17:11
问题 We are using an Informix database, and are connecting to it from .NET sucessfully using ODBC. The connection string we are using is; DRIVER={IBM INFORMIX ODBC RIVER}; UID=username; PWD=password; DATABASE=our_database; HOST=devsrv01; SERVER=devsrv01_tcp; SERVICE=ids9tcp2; PROTOCOL=onsoctcp; CLIENT_LOCALE=en_US.CP1252; DB_LOCALE=en_US.819; We want to change from ODBC and use IBM's SDK and libraries as outlined on their site. The code we are using is; string ConnectionString = "Database=our

SQL Express connection string hell ASP.Net

耗尽温柔 提交于 2020-01-01 11:58:24
问题 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 old classic ASP code to hit another database running on the same instance: Provider=SQLOLEDB;Data Source=MYLAPTOP\MSSMLBIZ;Persist Security Info=True;User ID=TestUser;Password=letmein;Initial Catalog=TestDB But trying a version of that makes the .net code throw a wobbler as he's written it using

Using multiple connection strings

99封情书 提交于 2020-01-01 09:45:48
问题 Info I have multiple projects in my Solution, of which one is the DAL and the other is an ASP.NET MVC6 project. Since the MVC6 project is also the startup project I need to add my connection string there. I saw this solution, but it is not accepted, nor does it work. My Try appsettings.json "Data": { "DefaultConnection": { "ConnectionString": "Server=.\\SQLEXPRESS;Database=Bar;Trusted_Connection=True;MultipleActiveResultSets=true" }, "FooBar": { "ConnectionString": "Server=.\\SQLEXPRESS

Using multiple connection strings

社会主义新天地 提交于 2020-01-01 09:45:42
问题 Info I have multiple projects in my Solution, of which one is the DAL and the other is an ASP.NET MVC6 project. Since the MVC6 project is also the startup project I need to add my connection string there. I saw this solution, but it is not accepted, nor does it work. My Try appsettings.json "Data": { "DefaultConnection": { "ConnectionString": "Server=.\\SQLEXPRESS;Database=Bar;Trusted_Connection=True;MultipleActiveResultSets=true" }, "FooBar": { "ConnectionString": "Server=.\\SQLEXPRESS

C# connection string in web.config file

浪尽此生 提交于 2020-01-01 09:14:13
问题 In my code behind page, how do I access the connection string which is stored in my web.config file? 回答1: System.Web.Configuration.WebConfigurationManager.ConnectionStrings["YouConnStringName"].ConnectionString; This requires references to System.Configuration.dll and System.Web.dll. 回答2: How to: Read Connection Strings from the Web.config File 回答3: From comment on http://msdn.microsoft.com/en-us/library/ms178411.aspx string c = System.Web.Configuration.WebConfigurationManager

Excel Data Connection Locks Access DB, Prevents Second Connection's Refresh

▼魔方 西西 提交于 2020-01-01 03:19:43
问题 I have two data connections to different queries in the same Access DB. The second one always fails (regardless of which I run first). When I look at the database, I notice that it has a lock file, which I think is causing the problem. It stays locked until I close the Excel file. Can anyone help me to unlock the db as soon as my import is complete? Additional info: I'm using Excel and Access 2010. The error: "The text file specification ' MyQuery Link Specification' does not exist. You

Right way to get username and password from connection string? [duplicate]

半世苍凉 提交于 2019-12-31 19:20:30
问题 This question already has answers here : Get user and password from ConnectionStringSettings (11 answers) Closed 6 years ago . I have a connection string like this: "SERVER=localhost;DATABASE=tree;UID=root;PASSWORD=branch;Min Pool Size = 0;Max Pool Size=200" How do I get the various database parameters out of it? I can get database name and server like this: serverName = conObject.DataSource; dbName = conObject.Database; I need the username and password as well similarly. No property is set

ADO.Net Entity Model - Is there a dialog for selecting the database? [closed]

独自空忆成欢 提交于 2019-12-30 07:08:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am looking for the standard dialog that will allow a user to create a database, connect to an existing database, select the database, test connection, etc.. and create the connection string from that. Is there some standard control for this? 来源: https://stackoverflow.com/questions/3087555/ado-net-entity-model

Defining connectionString for remotely hosted SQL Server

人走茶凉 提交于 2019-12-30 05:07:08
问题 At the moment I have the following <connectionStrings> definition in my Web.config` file: <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings> I didn't write this though, so I have a feeling that it was automatically created by Visual Studio. My database is hosted on a separate server on our network, so

Defining connectionString for remotely hosted SQL Server

余生颓废 提交于 2019-12-30 05:07:08
问题 At the moment I have the following <connectionStrings> definition in my Web.config` file: <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings> I didn't write this though, so I have a feeling that it was automatically created by Visual Studio. My database is hosted on a separate server on our network, so