connection-string

Setting Connection string in dbml files using Linq to SQL in Visual Studio 2008

醉酒当歌 提交于 2019-12-25 08:48:42
问题 I have an application that works with a database "TestDB". At the time I was developing the application I was using linq to sql and adding my data tables by dragging and dropping to the TestDB.dbml file and probably .net automatically sets the connection string to the local sql server on my machine. The application is supposed to launch on some windows based instruments. and the database will be local in those instruments. Now, how can I change the connection string to make sure that the

SQL Server Express connection string on server not working

試著忘記壹切 提交于 2019-12-25 08:14:54
问题 I have uploaded my project to a server and everything works fine until I try to "log-in" or "register" using EF Interestingly, on my PC, I have got this to work with SQL Server Express & SQL Server Compact - it just does not work on the server On the server, I have SQL Server Express installed Here is the connection string <add name="DefaultConnection" connectionString="data source=(localhost);Integrated Security=SSPI; database=aspnet-MvcDealerConn-20121005200308; AttachDBFilename=

adding connection string during installation of vb.net

落爺英雄遲暮 提交于 2019-12-25 07:24:55
问题 this is a follow up for my last question which is on: adding connection string during installation of vb.net project this is the code that I have so far but the "Configuration" in the line: Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(exePath) has a blue line and I can't run the program because of it. I converted the C# code to that one and the blue line appears. what I'm trying to do here is to get the a string that I can use for the connection string which will be

ConnectionString issues - SQL Server 2008 on Windows 2008

不想你离开。 提交于 2019-12-25 03:46:10
问题 We have a third party program that used to run on Windows 2003 against SQL Server 2000 database (app and db are on same machine). We are trying to migrate/install it on Windows 2008/ SQL Server 2008. The connection string as specified does not seem to allow it to connect it to SQL Server (see below) <Configuration name="PROG"> <ADOConnection> Provider=SQLOLEDB.1;Persist Security Info=False;User Id=sa;Pwd=p@ssw0rd;Initial Catalog=DB_NEW;Data source=servername </ADOConnection> </Configuration>

Exception with String argument, why is this happening?

丶灬走出姿态 提交于 2019-12-25 03:27:06
问题 I have : Dim con As New OleDbConnection(My.Resources.ConnectionString) // Give exception = Format of the initialization string does not conform to specification starting at index 62. When I substitute the actual value of the Resource, it give no exception : Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\rawData.xlsx;Extended Properties=""Excel 12.0 XML;""") The value of ConnectionString in Resources : <data name="ConnectionString" xml:space="preserve"> <value

Entity Framework 6.10 and database first with hard-coded connection string

前提是你 提交于 2019-12-25 03:15:29
问题 I'm trying to create libraries that will pull the connection string for entity framework from a common external source. I made the code below after looking at the answer to this question: How can l use Entity Framework without App.config Dim myConnectionString As String = "metadata=res://*/SoftwarePlatformModel.SoftwarePlatformModel.csdl|res://*/SoftwarePlatformModel.SoftwarePlatformModel.ssdl|res://*/SoftwarePlatformModel.SoftwarePlatformModel.msl;provider=System.Data.SqlClient;provider

ProviderIncompatibleException when running first time. But, not in second time

[亡魂溺海] 提交于 2019-12-25 02:59:45
问题 So, basically I'm using EF with Reverse POCO Code First Generator in my project. My connection Strings look like this: <connectionStrings> <add name="HistoryDBContext" connectionString="" providerName="System.Data.SqlClient" /> <add name="ProjectMgtContext" connectionString="data source=xxx;initial catalog=xxx;user id=xx;password=xxx;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> </connectionStrings> The idea is that I am going to read the

Server IP Change - Is using Computer Name to point to server advisable?

谁都会走 提交于 2019-12-25 02:55:43
问题 IP of the DB Server of our application is being changed. All other settings, configurations etc. incl. "Computer Name" will remain same. (DB server's OS is Microsoft Windows Server 2003, DB is Microsoft SQL Server 2005. Applications are .NET 2.0 based.) It requires that intranet applications, websites pointing to that server need to be referred using new IP which is not yet known. The problem is that changing to a new IP will require significant time & client cannot afford down time of more

Keyword not supported: 'metadata' + MySQL

夙愿已清 提交于 2019-12-25 02:53:06
问题 The error When it happens I'm attempting to create a simple controller using a ViewModel as model. Connection String <connectionStrings> <add name="BoaPropostaEntities" connectionString="metadata=res://*/Models.MyApp.csdl|res://*/Models.MyApp.ssdl|res://*/Models.MyApp.msl;provider=MySql.Data.MySqlClient;provider connection string='server=localhost;user id=root;password=root;persistsecurityinfo=True;database=mydatabase'" providerName="MySql.Data.MySqlClient"/> Web.Config spotlight I also added

Getting connection string from an external class in C# after parameters input

我的未来我决定 提交于 2019-12-25 02:33:16
问题 I Have a WinForm with 2 Text boxes to input ServerName and Database, RadioButtons to switch between providers, and 1 Button to build ConnectionStrings depending of inputs. _ServerName and _DatabaseName are Global variables. I would like to build the connection string outside the Form and get the result returned to a label control in my Form, the code in my external class is as next: public static string _ServerName { get; set; } public static string _Base { get; set; } public static