connection-string

WPF MVVM Samples with Database

 ̄綄美尐妖づ 提交于 2019-12-03 07:27:19
What examples exist of Windows Presentation Foundation (WPF) Model View ViewModel (MVVM) that include sample database connections? The BookLibrary (WPF MVVM) sample application of the WPF Application Framework (WAF) uses the Entity Framework in combination with a SQL CE database. you could have a look at those: http://www.codeproject.com/KB/WPF/WPF_MVVM_DB_Access.aspx http://karlshifflett.wordpress.com/mvvm/wpf-line-of-business-introduction/ or just this: http://www.google.com/search?q=mvvm+database I would recommend Building Enterprise Applications with Windows Presentation Foundation and the

The right connection string for Remote SQL server for C#

谁说胖子不能爱 提交于 2019-12-03 04:36:38
问题 I just want to know the right sql connection string for a remote sql server express edition. This is what I got but I got some problems SqlConnection cs = new SqlConnection(@"Data Source=(IP Address)\PC-NAME\SQLEXPRESS,1433;Network Library=DBMSSOCN;Initial Catalog=dbase;User ID=sa;Password=password"); I got this error in my C# debugger: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify

AzureWebJobsDashboard Configuration Error

佐手、 提交于 2019-12-03 04:24:54
I created a new Azure WebJob project in Visual Studio 2015 using .NET Framework 4.6. In the app.config, I set three connection strings: AzureWebJobsDashboard AzureWebJobsStorage MyDatabaseConnectionString The AzureWebJobsDashboard and AzureWebJobsStorage connection strings are identical and they're both pointing to my storage account. I'm including one of the connection strings -- since they're both identical, except the "name". <add name="AzureWebJobsDashboard" connectionString="DefaultEndpointsProtocol=https;AccountName=mystorageaccountname;AccountKey

How to get connection string out of Azure KeyVault?

余生颓废 提交于 2019-12-03 04:17:16
问题 A hypothetical web-site currently connects using: public SqlConnection CreateConnection() { DbConnection connection = new SqlConnection(); connection.ConnectionString = GetConnectionString(); connection.Open(); return connection; } Where the magical connection string is stored in web.config : String GetConnectionString() { //Get the connection string info from web.config ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings["db"]; if (cs == null) throw new Exception("Could not

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

China☆狼群 提交于 2019-12-03 04:04:40
问题 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 currently how many connections does my application support? What is the correct syntax for increasing the connection pool size? The application is written in C# 4.0. 回答1: Currently your application support 100 connections in pool. Here is what conn string will look like if you want to increase it to 200: public static

LINQPad - Connection String to my Oracle DB

旧街凉风 提交于 2019-12-03 03:47:26
I just started using LINQPad and all works great when connecting to my SQL Server DB, but now I'm trying to set up a second connection to my Oracle DB and I'm getting stuck as to how to do it. I downloaded the IQ driver (v 2.0.8.0 - Latest) and when I go to add a new connection, I select Oracle as my DB Provider and don't know how to do the rest based upon my usual connection string looking as follows: Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = [IP Address])(PORT = [Port]))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = [Service Name])));User Id=[name];Password=[password]

How can I safely store and access connection string details?

岁酱吖の 提交于 2019-12-03 02:54:38
I'm currently working on a ASP.NET MVC web site, and I've come up to a point where I need to integrate a database into the website. Normally I would simply add the appropriate connection string to the Web.config file: <add name="MainDB" connectionString="Server=localhost; Database=TopSecretData; User Id=Joe; password=password" providerName="System.Data.SqlClient" /> But there's obviously a glaring security flaw if I leave my User Id and password right in the Web.config , especially when it's under source control. In short: How can I store my connection string details without having it publicly

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

只愿长相守 提交于 2019-12-03 01:42:57
This question already has answers here : Get user and password from ConnectionStringSettings (11 answers) 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 on the MySqlConnection object. At present I do it like this: public static void GetDatabaseParameters(string connectionString

Building a connection URL for mssql+pyodbc with sqlalchemy.engine.url.URL

狂风中的少年 提交于 2019-12-03 00:44:46
The problem... I am trying to connect to a MSSql server via SQLAlchemy. Here is my code with fake credentials ( not my real credentials obviously ). The code... credentials = { 'username' : 'SPOTTER_xyz_ACC', 'password' : '123Goodbye2016!@#', 'host' : 'MARYLQLT01', 'database' : 'LRS_DUS', 'port' : '1560'} connect_url = sqlalchemy.engine.url.URL( 'mssql+pyodbc', username=credentials['username'], password=credentials['password'], host=credentials['host'], port=credentials['port'], query=dict(service_name=credentials['database'])) engine = create_engine(connect_url) connection=engine.connect()

winforms connection properties dialog for configuration string

混江龙づ霸主 提交于 2019-12-02 20:53:11
Is there a way to display the connection properties dialog for connection string browsing(for database) in run time? As I want the user to be able to connect to various database using the GUI. The same one as we get in visual studio connection properties dialog. Thanks in Advance FerranB Look for this article explaining exactly what are you looking for. What she say is the following: You will need to add a couple references to your project: OLE DB Service Component 1.0 Type Library Microsoft ActiveX Data Objects 2.x Library Use the following code: using MSDASC; using ADODB; private string