connection-string

Connect to SQL Server database using Asp.net MVC

泄露秘密 提交于 2019-12-13 00:49:21
问题 I'm starting with Asp.net MVC. When connect to SQL Server database then error. This is <connectionStrings> <add name="SGTSVNDBContext" connectionString="Data Source=DESKTOP-ABKAVRM\SQLEXPRESS;Initial Catalog=SGTSVNDBAUTH_CusCloud;Persist Security Info=True;User ID=sa;Password=;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> This is <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="ClientValidationEnabled"

How to properly store connection strings in Azure?

六月ゝ 毕业季﹏ 提交于 2019-12-12 20:18:02
问题 SQL azure connection strings always include a password (as Azure SQL Server doesn't support OS authentication) which makes it unsafe to keep them in web.config files. A typical recommendation you can find on the net is to move them to cloud configuration settings which means declaring a setting in ServiceDefinition/WebRole/ConfigurationSettings section of ServiceDefinition.csdef file so that you can edit them in the portal: The problem with this approach is whenever you re-deploy your site

SSIS Configuration connection strings

假如想象 提交于 2019-12-12 18:35:16
问题 I ran into a problem with some of our packages. The basic layout is the connection strings are stored in a SSIS Configuration table in the database. I've noticed lately that the server name for my oledb connections seem to remain static. I have seen where I move the package from one environment to another and the validation fails. If I change the password to what is used in the first environment it validates. Is there some other property besides the connection string that I need to store as

Find locations where connections are used Excel VBA

喜你入骨 提交于 2019-12-12 16:26:35
问题 I have a raft of Excel 2013 workbooks that I have to refine, each with multiple sheets and multiple data connections and I am looking for a quick way to list: connection name connection string location(s) where connections are used (sheet name or range would be useful) I can see all this information in the connections dialogs but am having trouble tracking them down programmatically. I want to do this one file at a time so am not worried about running code across all the files, just something

Dynamic Connection String for EF Code First

时间秒杀一切 提交于 2019-12-12 16:22:02
问题 My current connection string that resides in Web.config is this : <add name="PersonDBContext" connectionString="Server=111.111.1.11; Database=MyProgram; User Id=admin; Password=12345; Integrated Security=False" providerName="System.Data.SqlClient" /> I want to give the same connection string to the program in a dynamic way, this is my attempt : EntityConnectionStringBuilder csb = new EntityConnectionStringBuilder(); csb.ProviderConnectionString = "Data Source=111.111.1.11;Initial Catalog

Modifying connection string with variables

╄→尐↘猪︶ㄣ 提交于 2019-12-12 12:28:12
问题 so my goal is to have a "settings form" which allows users to edit the connection string (by changing the database name / server location. The reason for this is that it it needs to be able to changed when the server locations changes shortly by someone who may not have any C# experience (Front-End GUI). I've created the connection strings in app.config but cannot find a way to assign variables inside the conn string that can be changed? I've created some application wide settings using the

.Net PostgreSQL Connection String

半城伤御伤魂 提交于 2019-12-12 10:56:30
问题 I am using PostgreSQL in a project I am working on, and one of the queries is timing out. I need to increase the timeout on the database connection, but since I am using my DAO through a complex wrapper to Active Record and NHibernate, I am not able to adjust the timeout of the command object - so I am hoping you can change the timeout through the connection string. Any ideas? 回答1: Try this one: Provider=PostgreSQL OLE DB Provider;Data Source=myServerAddress;location=myDataBase;User ID

Regular expression for remove metadata

為{幸葍}努か 提交于 2019-12-12 10:46:09
问题 I trying to create a application with use some Entity Framework and some old DataSets but I only have a dynamic connection string using entity and need remove metadata at runtime to create a connection string to my database. Anyone know a way to remove all metadata from Entity Framework Connection I have this metadata=res://*/Models.SiteModel.csdl|res://*/Models.SiteModel.ssdl|res://*/Models.SiteModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=(local);Initial

MembershipProvider change connection string in code

久未见 提交于 2019-12-12 08:44:10
问题 I am trying to implement Asp.net Forms Authentication in my site. Usually, you provide the name of your DB connection string in your web.config. However, as our database setup is a little more complicated, I was looking for a way to manually provide the MembershipProvider the connection string in code. Thanks! 回答1: You don't have to use a connectionStringName for SqlMembershipProvider , instead you can supply the connection string directly. I.e. instead of: <membership defaultProvider=

Connecting to SQL CE db using SQLConnection

a 夏天 提交于 2019-12-12 08:36:36
问题 Pretty straightforward question. I'm building an app which reads data from a SQL Server 2005 instance. I wanted to run some tests on my laptop (which does not have SQL 2005) so I was looking at swapping in a local database for the purpose of the tests. I'm using VS2008 so the Compact Edition DB seemed a natural choice. I had hoped to just swap out my connection string, but it seems It will only let me connect to the CE database using the SqlCeConnection and not SqlConnection. Any way around