Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
connection string for visual studio inner database?
Posted
Comments
Shafeequl 29-Jun-13 2:37am    
inner db???
OriginalGriff 29-Jun-13 2:37am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
jaideepsinh 29-Jun-13 3:19am    
Inner database means local server data base or you use in bult sql in visual studio.

You can add connection string in app.config file of your project
C#
<add name="WindowsFormsApplication1.Properties.Settings.INSPEConnectionString">
            connectionString="Data Source=ServerName;Initial Catalog=DataBaseName;User ID=;Password=" providerName="System.Data.SqlClient" /></add>
..
 
Share this answer
 
XML
<add name="ConnString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DataBaseName;Integrated Security=True" providerName="System.Data.SqlClient"/>


hope it will help...
 
Share this answer
 
v2
XML
<add name="ConnectionStringName" connectionstring="Data Source=.\sqlexpress;Initial Catalog=DBName;Integrated Security=True">


ConnectionStringName= This is the Name of Connectionstring
connectionString = Here you have to give the SQLServer Path. (.\ represents local server)
Initial Catalog: You have to specify the DB name to be connected here
 
Share this answer
 
v2
If you want to give connectionstring from inner database..It is very simple.
You can only drag and drop any table from your database into your webform.Connectionstring automatically added into web.comfig file. After that you can change name of connectionstring from web.config if you want....

hope it will be help you..............
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900