connection-string

adding connection string during installation of vb.net project

偶尔善良 提交于 2019-12-25 01:50:03
问题 I want to create an installer wherein the user specifies where the connection string of the database. I've seen a articles like this but they're in C#. like this one: http://www.codeproject.com/Tips/446121/Adding-connection-string-during-installation I also tried to translate the code into vb.net but there are some errors I can't fix. If anyone can tell me how to do it or any article that might help me is really a great help. I want to do this in my vb.net project not in C# 回答1: Here is the

How create multiple db context instances by connecting strings?

北慕城南 提交于 2019-12-24 20:25:48
问题 In C#, MVC code first application I have public class CarContext : DbContext { } class in first version of application . And connection string is like <add name="CarContext" providerName="System.Data.SqlClient" Integrated Security=true; connectionString="Data Source=Dragon; Initial Catalog=CarDBv1;"/> When I run application, first version of database is created - CarDBv1 . Then I edit my CarContext class, for example, add new table, change any property etc., also change version of application

Can't connect through PHP to an Access Database

╄→гoц情女王★ 提交于 2019-12-24 19:45:02
问题 I have to establish a connection via PHP to a Access Database, but everytime I try I get this error: Fatal error: Uncaught exception 'com_exception' With message: ' Source: Microsoft OLE DB Service Components Description: Das Format der Initialisierungszeichenfolge entspricht nicht den OLE DB-Angaben.' in E:\path\to\phpfile.php:93 Stack trace: #0 E:\path\to\phpfile.php(93): com->Open('DRIVER={Microso...') #1 {main} thrown in The German text means something like "the format of the

How to use Mysql Connection String inside PHP code which is served by Azure Lunix App Service

眉间皱痕 提交于 2019-12-24 18:47:13
问题 I'm trying to host Wordpress to Azure lunix App service. I created a Azure Database for MySQL, then I got the web app connection string from the connection strings screen. The connection string format is Database={your_database}; Data Source={data_source}; User Id= {user_id}; Password={your_password} Then I created a Linux based app service and added the MySQL connection string to its configuration. Then I used this code in wp-config.php to get the Database connection string form the PHP

ASP.NET Connection String

眉间皱痕 提交于 2019-12-24 18:36:00
问题 I am having some trouble with one of my ASP.NET 2.0 application's connection string. There are instances that I would get a ConnectionString Property Has not Been Initialized problem which occurs randomly and intermittently and without any reason. My Connection string is actually coming from a webservice, because different kinds of users are provided with different sets of connection string depending on their user level. What I have done so far goes like this: I have a master page ( mstr.page

EntityFramework ignore login name in connectionString

寵の児 提交于 2019-12-24 13:52:00
问题 Hi iam trying to configure my first application with EF but find no way to connect to DB this is my context public partial class FunzionamentoContext : DbContext { public FunzionamentoContext() : base("FunzionamentoContext") {} static FunzionamentoContext() { Database.SetInitializer<FunzionamentoContext>(null); } public DbSet<Controllo> Controllo { get; set; } } this is connection string (present in app.config file of DAL project since i still don't have UI project): <?xml version="1.0"

Setup a valid connection string for SimpleMembership

a 夏天 提交于 2019-12-24 12:34:45
问题 I am trying to setup a valid connection string for my database so that my WebSecurity.InitializeDatabaseConnection method can point to my database. Here's my connection string: <add name="Database_Entities1" connectionString="metadata=res://*/Models.DAL.Entities.MTG_Model.csdl|res://*/Models.DAL.Entities.MTG_Model.ssdl|res://*/Models.DAL.Entities.MTG_Model.msl;provider=System.Data.SqlClient;provider connection string="data source=**.**.***.***;initial catalog=Model_Name;persist security info

Should the connectionstring come from the mvc project or the data project?

荒凉一梦 提交于 2019-12-24 12:16:31
问题 When using a separate project to handle db operations in an mvc project, should I store the connectionstring in the dbproject (using app.config) or should I keep the connectionstring in the web.config of the mvc project, and inject it into the repository (provided by the dbproject) when instantiating it? 回答1: The config is always read from the outermost app. The web.config is where your connectionstring should be. You can read it from your db project just as if it were the main project. You

Web.config entry to connect to SQL Server

泪湿孤枕 提交于 2019-12-24 11:27:51
问题 Well I'm trying to change the connection of my application from Oracle to SQL Server. I have this in web.config. <compilation debug="true"> <assemblies> ... <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> ... </assemblies> </compilation> and <appSettings> <add key="DatabaseProvider" value="Test.App.Oracle8i"/> <add key="SmtpUser" value="mail@example.com"/> <add key="SmtpPassword" value="testpassword"/> <add key="SmtpDefaultSender"

DSN-less connection to mysql server in ms-access not remembering user name and password

北战南征 提交于 2019-12-24 09:39:45
问题 For ease of distribution I want all the mysql linked tables to be DSN-less. I also want to be able to relink the tables to a different server easily (for test purposes), so I'm doing the link setup in vba code. This is the code I use to setup/refresh any links: Private Sub relink_mysql_tables(mysql_connection As String) Dim db As Database Set db = CurrentDb() Dim tbldef As TableDef For Each tbldef In db.TableDefs If (tbldef.Attributes And TableDefAttributeEnum.dbAttachedODBC) Then tbldef