connection-string

WPF and ADO.NET EF - error

Hi, I keep getting this error: Microsoft.Practices.Composite.Modularity.ModuleInitializeException was unhandled Message=An exception occurred while initializing module 'DiagrammerModule'. - The exception message was: An exception has occurred while trying to add a view to region 'MainRegion'. - The most likely causing except...

What is the difference between Trusted_Connection and Integrated Security in a connection string?

I'm curious what the difference between the token "Trusted_Connection" and "Integrated Security" in SQL Server connection strings (I believe other databases/drivers don't support these). I understand that they are equivilent. ********** Update I gave it to adrianbanks for the nice table of synonyms he found. The etymology which I inclu...

WPF and ADO.NET EF - error part II

Hi, I have added the connection string to the App.config of a main executable in my wpr, prism application and I get the following error: System.TypeInitializationException was unhandled Message=The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.Logger' threw an exception. Source=Microsoft.Practices.EnterpriseLi...

ADO.Net Entity Model - Is there a dialog for selecting the database?

I am looking for the standard dialog that will allow a user to create a database, connect to an existing database, select the database, test connection, etc.. and create the connection string from that. Is there some standard control for this? ...

Connect to remote MongoDB instance from ASP.NET

I'm having some trouble nutting out why I'm unable to connect to a new database I've created at MongoHQ. I want to include the correct connection string in my Web.config file and have my Mongo object refer to that for the database connection. The connection strings (edited, obviously) are: Public Access mongo flame.mongohq.com...

installing and configuring sql server and IIS for asp.net 3.5 database app [basic]

hi, I'm very sorry about this being a very cliché question, but I really need to understand some specific things. Everytime I add an sql server database in visual studio 2010 it creates a database under App_Data and then the connection string the server explorer uses is one which has an AttachDb field that points to the file. Now when...

Connect to MySQL database from VBA without having MySQL installed

I can connect to a remote MySQL db from an Excel workbook on my machine no problem using the following connection string: Driver={MySQL ODBC 5.1 Driver};Server=server;Database=database;user=user;Password=;Option=3; ..but when others try to use the same workbook the connection can't be made ("Data source name not found and no defaul...

SQL connection string for importing SO data sump

Hi, I'm trying to use Sam Saffron's program SoSlow (as suggested here) for importing SO's data sump into MS SQL Server 2008. Unfortunately, I have little idea of what I'm doing, and so do not know the Connection String that the program asks for. I have tried the following syntax: Data Source=SHIMI\SQLEXPRESS; Initial Catalog=SO; User I...

Why Oh Why won't VB.NET connect to this database?

Hi, First off, I can connect to both databases with SQL Server Enterprise Manager, so I know the servers are up and available. One of them is SQL1, the other is SQLTEST. In my program when I use the following connection string, it work connects just fine: conn = New DBConnect("Data Source=SQL1;Initial Catalog=SignInspection;Integrated...

Sql connection waits 15 seconds despite 3 seconds timeout in connection string

Hi, I have a website using Microsoft SQL 2008 server over local network. Sometimes, SQL server machine is rebooted, and so the website fails to connect to the database. If the machine is up and running, it will respond fast. If it's down, there is no need to wait for 15 seconds. 3 seconds are ok. I want to display apologizes on the web...

Single Connection String with Multiple Entity Framework Models?

At work we currently have a very large web application with a connection to a massive database. We have been using Entity Framework for a while now and to make things easier we divided the database into many Entity models. This works well for us but we ran into an issue. Each EF model needs its own connection string due to the metadata p...

ClickOnce and connectionStrings

I have a ClickOnce application that will be used by two clients (multiple users each). Application connects to MSSQL/MySQL. How can I supply them different connectionString with one ClickOnce deployment? I'd really like to keep things (as much as possible) simple on my end (and have single publish point), but how can I give them differ...

Server Explorer and connection string in the machine.config

How can I see in the in Visual Studio Server Explorer a connection if the connection string is defined in the machine.config file? It would be very useful to update a dbml file if I change a the DB schema... ...

Is the connecting string baked into the app.config of the respective assembly?

I have a website project which includes several assemblies which are built separately. One of the assemblies is the EntityModel, which also has an app.config file with the connection string to the database. The website project then brings that DLL into its own project. When I build the website assembly, I just copy the website folder t...

How to connect published Visual C# solution to a different database.

So here's the what's up. I just created and "published" a staff management tool in Visual C#. During development, I used a string saved in Properties.Settings.Default to connect to the database I was using for development. Now since the solution is published and ready to go, the boss wants to connect to the real staff database. I was...

How to hide connection string, user name, pw when using source control?

I'm working on a small side-project and I'm using connection strings and also api keys and values that should not be seen or used by other people. I use a public GitHub account for source control. What is the usual method for using source control when these values are in plain text in web.config? Do I need to remove the values manually ...

Escape quote in web.config connection string

I have a connection string in my web config: <add name="MyConString" connectionString="Server=dbsrv;User ID=myDbUser;Password=somepass"word" providerName="System.Data.SqlClient" /> As you see, there is a quotation sign ( " ) in the password (given from other dept. I can't change this db users password). How do I have to escape the qu...

How to make database connection string available to user.

Hello Friends, My problem must surely be easy to solve for someone who's more familiar with Visual Studios than I am. In the long run, I'm trying to publish a database application along with a config file that allows the user to change the connection string and connect with whatever database they wish. So, per the recommendations of [...

Having trouble connecting C# executable to database file on remote computer.

Hello Friends, Using VC# I've created a staff management app that, upon its first run, is expected to query the user for the path to a (.mdf) database which will reside on a remote computer. A resulting path may be something like string dbPath = @"P:\remoteComputer\public\StaffTool\ExamplePersonnelDatabase.mdf"; Then I'm placing th...

ConnectionStrings in app.config. What about security?

Is it really a Good Thing to put connection strings with passwords in the app.config file? It seems to me that the app.config is not encrypted in any way and the password information can be easily read. I have an app which accesses a database for which the intended end-user have no authentication. A group user/password is used. The ap...