connection-string

SQL Azure EF Database First Connection String in Azure Management Portal

坚强是说给别人听的谎言 提交于 2019-11-29 13:38:18
I have a site running n Azure, which uses EF Database First model. If I embed the connection string in the web.config and deploy all is rosy. <add name="MyEntities" connectionString="metadata=res://*/App_Code.Model.csdl|res://*/App_Code.Model.ssdl|res://*/App_Code.Model.msl;provider=System.Data.SqlClient;provider connection string='Data Source=my.database.windows.net;Initial Catalog=myTest_DB;User ID=***;Password=***; MultipleActiveResultSets=False'" providerName="System.Data.EntityClient"/> But, I don't want the connection string in the web.config because it contains credentials. So I moved

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

狂风中的少年 提交于 2019-11-29 13:12:20
问题 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 time for execution of query in web application? In my web.config : connectionstring , there is no code for timeout. If I choose a timeout there, will that affect other parts of my system? 回答1: You can do one thing. In the AppSettings.config (create one if doesn't exist), create a key value pair. In

Parser Error Message: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown

£可爱£侵袭症+ 提交于 2019-11-29 12:56:46
I am getting this error when I am using ODP.net The error is appearing when I include a connection <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="BannerCS" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BannerCS (Web.config)" ParameterPrefix=":" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.BannerCS.ConnectionString" Provider="Oracle.ManagedDataAccess.Client" /> in the .XSD file in the website project I have the following connection in the web.config file <add name="BannerCS"

Ado connection to SQL Server Compact Edition 4.0

匆匆过客 提交于 2019-11-29 11:45:17
I want to connect to SQL Server Compact Edition 4.0 from an old asp-classic site but i always get the error: "Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. " I tried sCon = "Data Source=c:\temp\sqlcompact.sdf;Encrypt Database=True;Password=testtest;Persist Security Info=False;" and Update: Error: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done sCon = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=c:\temp\sqlcompact

“The ConnectionString property has not been initialized” error in VB.NET

喜欢而已 提交于 2019-11-29 11:35:29
Every time I tried to connect to the database it give me this error "The ConnectionString property has not been initialized" what can I do to solve this? here are my codes Module Module1 Function GetInfoForStudent(ByRef QueryName As String, ByVal UserName As String, ByVal Password As String) As DataTable Using Con As New SqlConnection Try Using OleCon As New SqlConnection Dim Connection As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=G:\VB Project\Library Catalog System\Library Catalog System\library.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" Con.Open() Dim Cmd

how to define a connection string using an app.config file in C# [duplicate]

戏子无情 提交于 2019-11-29 11:07:50
This question already has an answer here: Get connection string from App.config 18 answers Currently i manually define my connection string in my C# code: string ConnectionString = "Data Source=C;Initial Catalog=tickets;Integrated Security=True"; SqlConnection Conn = new SqlConnection(ConnectionString); Conn.Open(); In my project i have an app.config file and i can see that it has a connection string. It looks like this: <?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="ticketNotification.Properties.Settings.ticketsConnectionString"

ASP.NET System.Data.EntityClient connection string help

試著忘記壹切 提交于 2019-11-29 10:48:31
I'm running ASP.NET MVC on a shared server and I'm having problems connecting to SQL via System.Data.EntityClient. Below is the connection string that my hosing provider gave me to connect to SQL and the one that VS configured for my local machine during development, what should my connection string look like when I deploy to the server? From my hosting provider: <add name="WeddingsDBEntities" connectionString="data Source=<server name>; Initial Catalog=<db name>; User ID=<user ID>; Password=<password>;" providerName="System.Data.EntityClient"/> From VS (during development): connectionString=

How i can use the connectionString of the current website for log4Net instead of configuring [duplicate]

孤者浪人 提交于 2019-11-29 10:48:26
问题 This question already has answers here : Can you pull the connectionString for a log4net AdoNetAppender from elsewhere in a web.config file? (5 answers) Closed 2 years ago . I use log4Net for my system's log. The connectionString node is mandatory if the appender type is the AdoNetAppender in Log4Net. However, I already have a connectionString in my website where I use Log4Net. How can I use the connStr of the website for log4Net instead of configuring the same connstr again in the log4net

How to set “Application Name” in ADODB connection string

强颜欢笑 提交于 2019-11-29 10:25:27
In .NET I simply use Application Name = MyApp inside the connection string, but when using ADO connection through VBA the Activity Monitor of the SQL Server Management Studio always shows Microsoft Office 2010 in Processes on the Application column no matter what name I set on the VBA code. conn.ConnectionString = "UID=" & UID & ";PWD=" & PWD & ";DSN=" & DSN & _ ";Application Name = MyApp" How can I set the application name for monitoring purposes? Ahh I see VBA connection string doesn't support the Application Name attribute. It simply isn't being recognized when used within VBA. The only way

How can I connect to a SDF database? No connection string I try seems to work

好久不见. 提交于 2019-11-29 10:22:57
I've tried literally 50+ different attempts at my connection string for my local database and nothing seems to work. I'm essentially just trying to open a connection the database file so I can dump in the data I've pulled out of my excel spreadsheet. I'm using Visual C# making an offline winform application. No matter what connection string I try in my app.config, it always fails when it tries to write "dReader" to the database. The error is usually this depending on what string I try: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The