connection-string

ADODB Connection String for .csv

旧城冷巷雨未停 提交于 2019-12-19 11:42:56
问题 I want to process .csv files with ADODB in Excel VBA. I tried a few strings found on web, but none of them seems to work. I'm getting file path using: strVFile = Application.GetOpenFilename("CSV (*.csv), *.csv") And then I pass strVFile as a parameter to the sub objReport.Load strVFile . The header of the sub is: Public Sub Load(ByVal strFilename As String) . Then I try to make ADODB connection using string: pconConnection.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &

Where should I place my database connection string and how do I handle connection pooling?

时光毁灭记忆、已成空白 提交于 2019-12-19 10:16:04
问题 I am developing an asp.net application which I have hosted on an IIS server. To open a connection I use: SqlConnection con = new SqlConnection("Server = INLD50045747A\\SQLEXPRESS; Database = MyDatabase;User ID = sa; Password = Welcome1; Trusted_Connection = False;"); con.Open(); Is it possible to store this connection string somewhere so that I don't need to write in every aspx.cs file? I am using MSSQL database. I'm facing an issue which says: The timeout period elapsed prior to obtaining a

.NET 2.0 App.Config connection strings includes unwanted SQLExpress default

馋奶兔 提交于 2019-12-19 09:27:04
问题 I'm using a connectionStrings section within an app.config file in a .NET 2.0 project. The config section contains two connection strings I have defined. When I retrieve the ConnectionStringSettingsCollection it has a count of 3. The 0th entry is a connection to SQLExpress Name: LocalSqlServer, ConnectionString: data source=.\\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true Why is this connection being included even though it's not in my app

With VBA, find the version of the the MySQL ODBC driver installed in Windows

自古美人都是妖i 提交于 2019-12-19 06:44:27
问题 Using Visual Basic for Applications , how can I find out which version of the MySQL ODBC driver is installed in Windows on a user's machine? I have a Microsoft Access application that uses the MySQL ODBC driver to make a connection. The connection string looks like this: ODBC;DATABASE=mydatabase;DRIVER={MySQL ODBC 3.51 Driver}; OPTION=3;PWD=password;PORT=3306;SERVER=server-db;UID=db-user; This was working find until the IT manager installed version 5.1 of the MySQL ODBC driver on a user's PC,

With VBA, find the version of the the MySQL ODBC driver installed in Windows

限于喜欢 提交于 2019-12-19 06:44:01
问题 Using Visual Basic for Applications , how can I find out which version of the MySQL ODBC driver is installed in Windows on a user's machine? I have a Microsoft Access application that uses the MySQL ODBC driver to make a connection. The connection string looks like this: ODBC;DATABASE=mydatabase;DRIVER={MySQL ODBC 3.51 Driver}; OPTION=3;PWD=password;PORT=3306;SERVER=server-db;UID=db-user; This was working find until the IT manager installed version 5.1 of the MySQL ODBC driver on a user's PC,

Where to place connection string in web.config

回眸只為那壹抹淺笑 提交于 2019-12-19 06:05:27
问题 My web.config looks like this : <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages

Where to place connection string in web.config

六月ゝ 毕业季﹏ 提交于 2019-12-19 06:05:17
问题 My web.config looks like this : <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages

In Flask-migrate ValueError: invalid interpolation syntax in connection string at position 15

荒凉一梦 提交于 2019-12-19 05:48:32
问题 I am using flask migrate to for database creation & migration in flask with flask-sqlalchemy. Everything was working fine until I changed my database user password contains '@' then it stopped working so, I updated my code based on Writing a connection string when password contains special characters It working for application but not for flask-migration, Its showing error while migrating i.e on python manage.py db migrate ValueError: invalid interpolation syntax in u'mysql://user:p%40ssword

ASP.NET connection string metadata syntax

自古美人都是妖i 提交于 2019-12-19 05:21:18
问题 I'm new to ASP.NET-ville, be gentle. I have been troubleshooting a ASP.NET setup, where the server/database values are changing, therefore web.config needs to be updated. There are multiple <add name="NameXYZ" connectionString="blah" /> instances (multiple ASP.NET components), but some of these are marked up differently to others. I've got the following provided: <add name="CONNECTION-B" connectionString="metadata=res://*/ZZZZ.ssdl;provider=System.Data.SqlClient;provider connection string=

Set ConnectionString at RunTime

左心房为你撑大大i 提交于 2019-12-19 03:43:12
问题 I´m a beginner in C# programming. I need to edit/set/change my connection string that I stored in my app.config , I'm using VS database wizard to create the queries. If you could write the code it will be very nice :) 回答1: Something like this should get you started: using System.Configuration; var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var connectionStrings = config.ConnectionStrings; foreach (var connectionString in connectionStrings