All Questions
Tagged with connection-string winforms
125
questions
9
votes
1
answer
9k
views
Secure ConnectionString in WinForm Applications
How Can I Secure my ConnectionString in WinForm Application?
6
votes
3
answers
9k
views
Split Connection String
In a WinForm Application I Store My ConnectionString in App.Confing File.How Can I split this connectionstring to some Data like username,DataBaseName,Password and other thing Dynamically?
6
votes
4
answers
5k
views
Connection string security in .net desktop application
i'm developing a .net winforms desktop application intended to be run at several bank's branches as a backup application whenever the main one (a web application) is unavailable due to connection ...
5
votes
4
answers
56k
views
how to define a connection string using an app.config file in C# [duplicate]
Currently i manually define my connection string in my C# code:
string ConnectionString = "Data Source=C;Initial Catalog=tickets;Integrated Security=True";
SqlConnection Conn = new SqlConnection(...
4
votes
1
answer
6k
views
Iterate through connections strings in App.Config file in VB.Net
I am trying to iterate through all the connection strings in App.Config using VB.net.
I would like to:
1. Get a count of all the connection strings
2. Put them all into a listbox.
I have tried using ...
4
votes
2
answers
13k
views
Connection string for SQL Server ( local database )
I added a local database to my application in Visual Studio:
database
and I need connection string for it - here it is:
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "Data ...
4
votes
1
answer
3k
views
Location of Microsoft access database for windows form when creating setup file using installshield
I have developed windows form which uses Microsoft Access Database.
During development i have put database file in root folder with in project.
When i run application through visual studio, it run ...
3
votes
3
answers
3k
views
Protecting connection string from Man in the middle
In my winforms application i am hashing the connection string in local level.
But here a couple of questions.
After my app decrypts the connection string, the connection string info is sent in ...
3
votes
2
answers
12k
views
How to create connection string dynamically in C# [closed]
How to create connection string dynamically in C#, instead of creating it using string concatenation?
3
votes
2
answers
744
views
C# WinForm set ConnectionString and Entity Framework on installation
I use clickonce to deploy my program. the problem is the deployement team have to enter his conectionString on installation and write into app.config.
How can I add a dialogbox (for put the ...
3
votes
6
answers
22k
views
Getting error: A network-related or instance-specific error occurred while establishing a connection to SQL Server
I'm newbie developer. I have a problem trying to connect to SQL Server from my computer to server machine.
A network-related or instance-specific error occurred while establishing a connection to ...
3
votes
2
answers
2k
views
C# ConfigurationManager retrieves wrong connection string from app.config
I have a simple WinForms app that will eventually be a game. Right now, I'm just working on the data access layer of it and I've run into a snag. I created a separate project called DataAccess and ...
3
votes
1
answer
20k
views
Winforms connection strings from App.config
I have a Winforms app that I am developing in C# that will serve as a frontend for a SQL Server 2005 database. I rolled the executable out to a test machine and ran it. It worked perfectly fine on the ...
3
votes
1
answer
2k
views
Build SQL Connection string with integrated security for use over VPN?
I have Winforms application that connects to a SQL database. We are changing the connection strings so that they will now use integrated security (Windows Authentication) instead of SQL authentication....
3
votes
1
answer
3k
views
Connection string not being read from App.config in project
I am using an abstract class to get the ConnectionString from my App.config file. However instead of the ConnectionString specified the app comes up with ...
{data source=.\SQLEXPRESS;Integrated ...
2
votes
3
answers
334
views
Unable to connect to Local SQL database from app.config in windows form application
i am trying to connect my local MySQL database to my windows form application using app.config.
but i am keep on getting the below mentioned Exception.Can anyone help me please.
Exception :
App....
2
votes
1
answer
2k
views
Quick Book Integration with C# Windows Application
I have Quick book application installed in my system. And i have created few vendors and customers list.
Quick Book: QuickBooks Simple Start 2010 Free Edition
Database : QuickBooks Database Server ...
2
votes
3
answers
2k
views
Winforms - Replace a ConnectionString at runtime
I'd like to allow my users to switch between different databases on the login page at runtime.
I currently have the ConnectionString stored in my App Settings file and all the datasets refer to this ...
2
votes
2
answers
3k
views
Read configuration from App.config instead of AppName.exe.config
I have developed a small windows service which performs few database operations. I have to give an option to the user to change server name on post-deploy. if user changes in app.config it doesn't ...
2
votes
1
answer
1k
views
Advice in storing sensitive data in Windows Form Application vb.net c#
I'm currently working on a Windows Application Project and I have two problems in securing data.
First,I need to make a file that store a password as string which the user should enter it every time ...
2
votes
1
answer
3k
views
Open SQLITE read-only in c#
I trying to open an SQLITE database in read-only mode according this link:Connection strings for SQLite
SQLITE Connection string
string ConString = string.Format(@"Data Source={0}dbname.s3db;...
2
votes
2
answers
957
views
C# WinForms changing database name in other form
So here is my first question and my first C# program:
I need function that could permanently change a connection string.
My program has this structure:
Main form is Form1, when I click the button, ...
2
votes
3
answers
20k
views
App.Config Connection String
In my windows form i have connection string in app.config as
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="Database"...
1
vote
1
answer
322
views
Where does app.config belong?
i have a winforms app, the solution has two projects client (winforms) and the business logic(as Library classes). When i create a datset.xsd file in the client, it adds app.config file to the client. ...
1
vote
4
answers
1k
views
ConnectionString for connecting to SQL Server Database?
I have an application (WinForms) which using SQL Server as its database.
Now I am using app.config file to access ConnectionString.
Have a look at my app.config file
<configuration>
<...
1
vote
5
answers
899
views
Best way to set up the connection setting
I am new to windows forms programming and I was wondering what would be the best way to create like a connectionstring.config (i dont know how to do this) I have seens it , its like an xml giving all ...
1
vote
1
answer
1k
views
How to store MySql database connection string in C# WinFrom desktop application
Keeping of MySql connection string with server, user, password and database data seems incorrect inside the code.
I see only two ways, how it can be stored, one is adding into Resources .txt like ...
1
vote
1
answer
344
views
Understanding the different ways to connect to CRM 2011
I'm a beginner CRM developer and I'm quite confused about the connection methods to CRM.
What's the difference between creating a SOAP service reference to connect to CRM 2011 from a windows form ...
1
vote
1
answer
1k
views
How to get the DataSource name in dropdownlist control in C# Winforms
Hi I am developing an application to retrieve data from one system to another remote system.
To do this I am firstly setting the connection string of the application by below screen.
When I chose the ...
1
vote
3
answers
2k
views
cannot connect sql server 2008 from another computer [duplicate]
Possible Duplicate:
System.Data.SqlClient.SqlException A network-related or instance-specific error
i have winform application in c# which connect to my own db and its working fine my current sql ...
1
vote
1
answer
2k
views
How to correctly move location of .mdf file and change Connection String's DataDirectory accordingly
Currently my SQL database is on
C:\Users\Slaven\KasaMP.mdf
I want to move it into my projects directory [maybe "database" folder(?)] and make correct changes on my connectionstring. My goal is to ...
1
vote
3
answers
4k
views
C# WinForm application - How to save connection string (SQLite)
I have a winform app in .NET 4.0 with database (SQLite). I need to add an option for user to be able to change the path to the file containing the database - in short, to change the connection string. ...
1
vote
2
answers
3k
views
Reading a connection string from a class library
I am currently struggling to read a connection string from the App.config inside my WinForms application from my Class Library (and Unit Testing).
I added a 'test' entry to the App.config;
<...
1
vote
2
answers
592
views
Delete the old connectionstring
I have created a application that can create connectionstrings and edit connectionstrings.
doc.Load(Path.Combine(path, SelectConfigComboBox.SelectedItem.ToString(), "app.config"));
XmlNode xNode = ...
1
vote
2
answers
862
views
How to Change Connection String of Published Application
I have published a windows form application with a certain sql connection string . for security reasons i should change the password of my sql server user wich is used in connection string.
I tried to ...
1
vote
2
answers
291
views
ArgumentException caught while trying to enter connection string
I am trying to develop a very simple Student Enrollment System, and as I built and compiled my solution, an ArgumentException was caught near my connection string. The exception message displayed is ...
1
vote
1
answer
1k
views
How to change App.config file at run time from textbox value?
I have created a project which has App.config file. This App.config file is fixed. I wanna change connectionString at run time using textbox's value.
Here are two textboxes textbox1 & textbox2. ...
1
vote
1
answer
429
views
Installation project dynamic connection string
I have a windows forms application, that i want to deploy as installation project using visual studio 2010.
I am using SQLite database and i want to create a connection string while the installation ...
1
vote
1
answer
134
views
Specify SQL Server connectionstring on a messed up network
The current scenario before i start asking my question
A C# Winforms application needs to be deployed on our LAN.
The network contains 200+ computers running Windows XP (& above) having the same ...
1
vote
1
answer
995
views
vb.net connection entity framework connection string security
I understand the possibilities for encrypting a connection string in .net v4. I have a win forms application that will be used by multiple people on different machines. I understand that I need to ...
1
vote
1
answer
2k
views
Save a new connection string from within a windows forms app?
I'm writing a Windows Forms app, VS2010, NET Framework 4.0, coding in VB. I'm using the Microsoft Data Connection Configuration dialog in my app to choose a data source. It seems to work fine and ...
1
vote
1
answer
121
views
Is it okay to have plaintext database username and password inside Dataset.xsd file in a C# winform application?
I have a dataset.xsd file within a C# winform application. when I opened the datased.xsd file with notepad++ I found all the database authentication information (id, password).
I read about ...
1
vote
0
answers
176
views
Different behaviors in similar SQL Server connection string using C#
I have encountered a situation which looks weird to me. Though I have figured out another simpler way for my code to work but I'm curious to know as why this is happening. Here is the code that works ...
1
vote
1
answer
440
views
How can i tell if my connectionStrings section is encrypted or not?
I have followed Microsoft's instructions here in order to encrypt my connection strings for my application. I have opted to move my connection strings to their own configuration file, connections....
1
vote
3
answers
585
views
Why doesn't DataDirectory change on run time
I am tring to connect to a local database with w winform c# application
when i set my connection string to Data: Source=C:\Users\PACKARD BELL\documents\visual studio 2010\Projects\GestionStock\MyApp\...
1
vote
2
answers
682
views
ConfigurationManager.ConnectionString reads app.config from different location
The app.config of my C# windows application has the following ConnectionString
<connectionStrings>
<add name="DS1" connectionString="Data Source=DataSource1;" providerName="" />
&...
1
vote
0
answers
60
views
DataDirectory macro works for SQL Server CE 3.5, but not 4.0
In attempting to upgrade a WinForms application using SQL CE 3.5 to 4.0, I found that the DataDirectory macro was not getting replaced. SqlCeConnection.DataSource always shows "|DataDirectory|" ...
1
vote
1
answer
3k
views
How do I format the Db connectionstring in my app.config file for a Windows Forms Application?
I've scoured the internet to try and configure my App.config connectionstring properly for a Windows Forms application to no avail.
Here's my first attempt at connecting my application to my database:...
1
vote
1
answer
2k
views
App Config - The Login is from an untrusted domain
First, I try to connect to sql server of other computer(PC1-PC\Instance1) through ssms with Windows Authentication but got this error
Login failed. The login is from an untrusted domain and cannot ...
1
vote
0
answers
596
views
Ms Access connection string
I am making a single user database app. I have created a database in Ms Access.
Here is the code I have written...
OleDbConnection con;
con = new OleDbConnection(@"Provider=Microsoft.ACE....