connection-string

multiple connections to an mdf file

前提是你 提交于 2019-12-08 01:06:23
问题 im creating a .Net application using c# for a university project and need some help! I have a mdf file hosted on a network drive and need several clients to be able to access this database from their applications. Each client machine will be running their own instance of sql express. I can access file from my application, but when another client tries to they receive the following error message Cannot open user default database. Login failed. Login failed for user 'EEEC\40023753'. The

C# Linq to SQL connection string (newbie)

[亡魂溺海] 提交于 2019-12-07 23:56:07
问题 i am a new linq to sql learner and this is my very first attempt to create a data viewer program. The idea is simple, i'd like to create a software that is able to view content of a table in a database. That's it. I got an early problem here already and i have seen many tutes and articles online but I still cant fix the bug. Here is my code: static void Main(string[] args) { string cs = "Data Source=localhost;Initial Catalog=somedb;Integrated Security=SSPI;"; var db = new

ODBC 5.1 connection string for MySQL with read-only access

只谈情不闲聊 提交于 2019-12-07 21:45:03
问题 I have read-access to a MySQL database and am trying to connect to it via the MySql ODBC 5.1 driver. I'm getting an authorization failure (401) from the server. The administrator set up my access as follows: mysql> grant select, create temporary tables on theDatabase.* to 'adrian' identified by 'password'; I am successful in connecting to the database using tools like dbvisualizer. The connection string I'm trying to use in C#.NET is as follows: "Driver={MySQL ODBC 5.1 Driver};Server

vb6 ADODB connection string to sql server 2008

ぐ巨炮叔叔 提交于 2019-12-07 17:50:35
问题 I recently migrated a database from sql server 2005 to 2008 on windows server 2008. Clients connect fine from their XP machines and so does the SQL Management Studio 2008. I have also tested a remote connection using LINQPad which worked fine. However on my VB6 app, the connection string seems to give me problems. Any ideas what I'm doing wrong? Dim strUserName As String Dim strPassword As String Dim sProc As String sProc = "Class_clsAdoFnx_Initialize" Me.DatabaseName = "db_app" 'Connect to

Entity Framework 6 - Npgsql - connection string error

淺唱寂寞╮ 提交于 2019-12-07 15:21:28
A tricky (and frustrating problem) - perhaps you folks may be clever enough to solve it: Problem I want to be able to read/write to my database using Entity Frameworks. I have got a simple app rails running on Heroku (straightforward scaffold). I want to connect to this database and manipulate records. The good news is that I can successfully connect to that database using npgsql. The bad news is that I cannot do it with Entity Frameworks. This is the error I’m receiving: System.Data.Entity.Core.ProviderIncompatibleException: An error occurred while getting provider information from the

Can't open a connection to SQL Server 2005 from a pocketpc (windows mobile 6)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 12:08:30
问题 I'm trying to connect from a pocket pc app (windows mobile 6) to a SQL Server 2005, but no matter how hard I try it didn't work. I checked every possible configuration for enabling tcp on SQL Server, I tested many connection strings, but still have the problem when I attempt to open the connection, I'm sure it's not a network issue because I can ping on my pocket pc from the server machine without any problem and the firewall on my server machine is disabled : here is one of the connection

Apostrophe (single quote) in connection string

妖精的绣舞 提交于 2019-12-07 07:46:00
问题 I'm having a trouble with the ' character in a connection string. Entity Framework throws an exception saying: Format of the initialization string does not conform to specification starting at index I tried the answers suggested here and here to no avail. I also tried constructing it with SqlConnectionStringBuilder class and got the same exception as a result. Can anyone help me out? Thanks in advance. EDIT: The connectionstring is indeed in the web.config file and it looks like this: <add

How To Access Azure Function App ConnectionString Using dotnet Standard

旧街凉风 提交于 2019-12-07 06:12:36
问题 My Azure Function App has a ConnectionString defined. I want to retrieve it from a C# function written in dotnet standard 2.0. I have tried adding System.Configuration.ConfigurationManager to the project.json and using var str = ConfigurationManager.ConnectionStrings["my string"].ConnectionString; but I get the error run.csx(24,15): error CS0103: The name 'ConfigurationManager' does not exist in the current context How do I access the connection string? 回答1: ConfigurationManager is not

where to store database string connection in java web app?

ε祈祈猫儿з 提交于 2019-12-07 05:38:33
问题 I'm about to begin my first project with java Let me tell how I used to handle these things... So far now, I've been workin on asp with a com+ componente made with VB6. The component is registered via the com+ administration console with a domain user, something lile my_company_domain\my_app_account The components reads the configuration from an udl file, configured to access the DB with integrated security. I invoke the componente from asp with server.createobject, the component runs with

Format of the initialization string does not conform to specification starting at index 0 on azure

本小妞迷上赌 提交于 2019-12-07 05:12:38
问题 Have been with thi problem for hours, this is my connectionstring: <connectionStrings> <add name="OL4RENTDb" connectionString="Server=v812xrqz2w.database.windows.net;Database=ol4rentDB;User ID=AdminOL4RENT@v812xrqz2w;Password=Grupo501TSI;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" /> </connectionStrings> an error: [ArgumentException: Format of the initialization string does not conform to specification starting at index 0.] System