Tagged Questions
0
votes
1answer
21 views
Connection String Error (Given path not supported)
I have seen a lot of the same error but in different situations. My particular error is thrown right at the first SqlConnection line. I have no compilation errors so why is it failing?
SqlConnection ...
0
votes
0answers
15 views
Connection string from EA to nHibernate
I'm writing addin to EA and I have problem with connection string.
How to use connection string from EA.Repository in nHibernate? Or how to extract connection details from EA.
I can have user id, db ...
0
votes
0answers
22 views
Kill all connection to database using c# code
I am trying to restore my database using c# code ,So i googled and i found this link :
http://www.codeproject.com/Articles/123441/SQL-Server-Backup-and-Restore-Databases-using
The backUp part works ...
0
votes
1answer
29 views
Retrieving data from Excel in C#
I'm using an Excel workbook as database, my code in C# WinForms and already writes on each Excel column and filters the Text from letters, etc.
But I have one problem, when I double click N times ...
0
votes
1answer
28 views
How to check database connection status?
What is the most elegant/practicable way to get the database connection state via fluent nhibernate? I know there is the possibility to check the up-state via SqlConnection class, but is there a way ...
0
votes
1answer
13 views
Connection String with WCF and deployment
I have an WCF service in Visual Studio. The WCF Service must simply write to a database name Market.mdf. What I have done to write to a database is:
string connectionString = "Data ...
0
votes
1answer
34 views
My dbcontext doesn't expect any connection string as an input
I have 4 layer in my application UI,DomainClass,Model(DBCntext),Repository.
In repository i have an abstract class like this :
public abstract class GenericRepository<C, T> :
...
0
votes
2answers
32 views
Set manual Entity framework connection string
I have a model that is created by EF6 ,by default my connection string is initialized in app.config as you can see here :
<connectionStrings>
<add name="ShirazRailwayEntities" ...
1
vote
1answer
40 views
How to define a connection string to create local database in the current folder?
My current connection string is:
<connectionStrings>
<add name="myConnectionString"
connectionString="Data Source=(LocalDB)\v11.0;Initial ...
0
votes
0answers
32 views
MySQL remote SSH Connection using .NET C#
Below is a screenshot from MySQL workbench. The parameters are not real, but the structure shown here is exactly as per my real connection which is working nicely.
I am trying to connect to this ...
-1
votes
1answer
48 views
Windows authentication in app.config?
In web.config, to use windows domain authentication, I am aware to do the following:
<add name="MSSQL" connectionString="server=devserver;database=DBNAME;Integrated Security=SSPI;" ...
0
votes
2answers
33 views
Keyword not supported: 'data source' web.config
I cant seem to see where the problem is in my connection string, where you have the " in the string I've even tried adding single quotes as advised on stackoverflow but it still doesn't seem to ...
0
votes
2answers
43 views
Connection string read from textbox
I'm trying to make my mysql connection string read from textbox instaid of direct string what i was trying to do is this
string myConnection = "datasource='" + this.label12 + "';username='" + ...
-4
votes
1answer
36 views
How to connect from C# web applications to a SQL Server 2008 R2 database
I have created a web application form with 3 text boxes for entering name, Id and address into a table in SQL Server 2008 R2 database with the database name mydb.mdf and table table1 with column names ...
1
vote
0answers
42 views
What is the secure way to store database connection string information that can be created at run-time?
I am creating a web application that allows the user to choose and save which database he/she wants to connect to in order to set that as the database that contains users information.
STEP 1: Create ...
1
vote
2answers
89 views
Visual Studio 2013 not opening automatic data source configuration wizard?
I am a beginner to programming in C# and Visual Studio 2013. I am following this How to but it is not working as described.
I am doing this:
Right Click on Project in Solution Explorer -> Add ...
0
votes
1answer
46 views
Connecting a SQLite database to a C# Windows Phone 8 Application in Visual Studio 2012?
I am making a C# Windows Phone 8 application in Visual Studio 2012. I want to read data from a SQLite database. I tried import using "Finisar.SQLite;" by referring to the relevent dll. But it gives me ...
0
votes
0answers
77 views
How to set a crystal reports data-source from the program code?
I've got a pre-existing process that was connecting to the database from internal settings within a crystal reports report file.
Now I need to change this in order to set the data-source (server, ...
0
votes
0answers
36 views
Direct different users to different databases at login
I need to have different connection strings for different users. There are several threads which present similar scenarios, none of which have the solution -- how to establish a dynamic connection to ...
-1
votes
3answers
121 views
SqlCommand connection string for localhost database
I am trying to create a simple website in VS Express for Web 2013 which can interact with a database "Parts." My database is stored in the app_data folder. I am able to view the connection in the ...
0
votes
1answer
41 views
Is it possible to access connection string which defined in a C# class using Entity Framework?
I need to use entity framework in a application and I need to set username and password in connection string within web.config file from user inputs.Now I need to know how I can access to connection ...
1
vote
1answer
32 views
Saving to DATABASE MVC pattern
I am fairly new to programming so please bear with me.
I have written following code in different classes throughout my project, and I am wondering why my input does not get stored in my database. I ...
0
votes
1answer
27 views
C# Oracle connection string for DataGrid
When I import Dataset to application in connnection string I choose "No exclude information from connection string. I will set this information in my aplication".
Now when I compile the form there is ...
0
votes
1answer
36 views
Winform app with loaded DB connection [closed]
I have a question regarding problem i am solving. I am editing an old Winform app; currently the only part I need does not take input from the user(automated program). However the form contains ...
0
votes
2answers
61 views
MySql ConnectionString without Database name to create a database in c#
I have got a situation where i do need to create a database into MYSQL by using the connection string needed to get into mysql server.Till Now i have used connectionstring with database names .So in ...
1
vote
0answers
33 views
Entity Framework & udl
Just recently found the concept of Universal Data Link (.udl) for specifying database connection information.
I have been wondering how to get or edit the connection string for a specific user of the ...
0
votes
2answers
36 views
Connect to an older version of SQL Server Compact database without upgrading
I am using VS2013 to connect to a .sdf database file and am getting this error:
The database file has been created by an earlier version of SQL Server
Compact. Please upgrade using ...
-1
votes
1answer
53 views
Unknown error with System.data.dataset
I am new to database and SQL, so i have no idea what to initialize at dat_set
My code:
public System.Data.DataSet GetConnection
{
get { return MyDataSet(); }
}
private System.Data.DataSet ...
0
votes
1answer
40 views
error while connecting to the SQL database
This is what I get:
'PatientDatabase.Properties.Settings' does not contain a definition for 'SQL' and no extension method 'SQL' accepting a first argument of type ...
1
vote
1answer
35 views
C# How to connect to Oracle database and necessary connectio nattributes
I have an Oracle database that I am trying to connect to. I am new to connecting to databases in C#. I have been researching online, but I get all kinds of different answers / responses that leave me ...
1
vote
1answer
148 views
How to dynamically change crystal report database connection
I am new with crystal reports. I tried to to implement the crystal report in my win form c# application using report wizard visual studio 2012, so don't know what happen's in backhand for this. ...
1
vote
2answers
68 views
In what format does SqlCeConnection expect its connection string arg?
I have a call to SqlCeConnection.Open() that's failing. The exception message I'm getting is pretty generic: "System.Data.SqlserverCe.SqlCeException" (more generic than pretty)
The pertinent code ...
0
votes
1answer
151 views
Additional information: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I am getting this error anytime I try to open my ODBC connection.
This is my connection string:
<add name="ODBCConnection"
connectionString="Driver={IBM InfoSphere Classic ODBC Driver ...
-3
votes
4answers
76 views
C# Winform Application
I am creating a winform application which connects to a ms-access database. The problem is with my connection string as i can access the database locally but if i run from my usb stick or from any ...
0
votes
0answers
31 views
Getting the connection string.
What is the best practice to get the connection string from.
I have seen a repostiory class have a base class that defined the connectionstring.
But I have also read some where that we should not ...
0
votes
1answer
44 views
MS VS 2013 for Web Local Database using aspx.cs to connect to local database
Using MS VS 2013 Express for Web Local Database (also SQL Server Express) using aspx.cs to connect to local database.
When I run the code nothing shows on browser.
The finance2 table does have ...
0
votes
0answers
44 views
Importing an existing database for windows phone silverlight 8 .Is this correct or not?
string DB_PATH=Path.Combine(Path.Combine(ApplicationData.Current.LocalFolder.Path,"/Database/temp.sqlite"));
SQLiteConnection dbConn;
dbConn = new SQLiteConnection(DB_PATH);
if (dbConn == null)
{
...
0
votes
0answers
107 views
Unable to cast object of type 'System.Data.SqlClient.SqlInternalConnectionTds' to type 'System.Data.SqlClient.SqlInternalConnectionSmi'
I keep getting the error mentioned in the title and I just can't seem get passed this.
Here is my code:
strSig = sigPlusNET1.GetKeyReceiptAscii()
sigPlusNET1.LCDRefresh(1, 210, 3, 14, ...
0
votes
0answers
37 views
Share database connection strings between two console applications
Background Information
Currently I have two C# console applications: Job.JobManager and Job.JobResources. Job.JobResources stores all of the database connection strings and actual implementation for ...
0
votes
2answers
136 views
How to use singleton class for database connection in windows application
In my windows application I am using Access database. When application starts it should to open the connection. I use the connection string to call the procedures/stored queries and access the data. ...
1
vote
0answers
80 views
ASP.net MVC 4 Creating new controller issue 'unable to retrieve metadata'
I'm trying to Add new controller in my project but I got this error :
unable to retrieve metadata for 'MvcApplication1.Models.REGION" object reference not set to instance of object.
And this's my ...
0
votes
2answers
52 views
How to I pass the database file name through one form to another
In my windows application I am using MS access database. In mainForm (Contain menu), where user will select (open) data file through Dialogbox. And he will be able to select a menu to access the ...
0
votes
3answers
69 views
ASP.net: Opening and closing database connections
I have this code which first checks if a particularprodName already exists in the database. If it does exist, I have to update quantity of that prodName. If not, I have to insert the data. What my ...
0
votes
0answers
11 views
Does anyone know how a Connection.State becomes ConnectionState.Broken?
What I'm trying to do is debug a particular scenario in a batch process that uses EF5. The DbContext is in scope for quite a while before SaveChanges is called, but sometimes we get an exception ...
0
votes
0answers
93 views
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission' failed
I get this error message when trying to connect to a database from an application. Rather than change anything with the application, is there anything I can do with the permissions of the ...
1
vote
1answer
53 views
SQL Network Interfaces, error: 26
I've built a website with asp.net & c# that was working well in localhost but when I uploaded it to smartasp.net it is showing this error(SQL Network Interfaces, error: 26 - Error Locating ...
0
votes
0answers
31 views
connecting to database in c# via IP\DEV
Im Trying to connect to a database on a SQL server Located on 192.168.100.42\DEV but i keep getting a network related error see below by code and then the error , If any one can help it would be ...
0
votes
1answer
71 views
MVC enable-migrations NOT FINDING CONTEXT IN ASSEMBLY
I have two models, one I created in Microsoft SQL Server.... and one I am attempting to manage user roles etc for the application.
I used an approach that considers the ApplicatonDBContext for ...
0
votes
1answer
82 views
How to change db connection programmatically c# Entity Framework
I've built my project and named the db connection "VMaxEntities"
The connection string exists in web.config.
I have another connection string "Development_VMaxEntities"
Whenever I call the db, I ...
0
votes
1answer
33 views
The provider did not return a ProviderManifestToken string EF
I am trying to connect to remote database
Here is my connectionString:
<add name="myprojectname.DataContext.Models.FBAppContext"
...