.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Local Database attachment in Windows Application

Posted By: Hary     Posted Date: July 11, 2011    Points:5   Category :C#
Hi All

i want to attach local database ie Database.sdf in my windows application but i am not able to get the connection.
Please tell me any solution?

my connection string is given here:

String connectionString = "Data Source=|DataDirectory|\\Database1.sdf";

Responses
Author: Ravi Ranjan Kumar             
Posted Date: July 11, 2011     Points: 20   

go there
http://www.connectionstrings.com/sql-server-2005-ce

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com
Author: Narayanan             
Posted Date: July 12, 2011     Points: 20   

hi
Data Source=" + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\DatabaseName.sdf;Persist Security Info=False;


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Gowthammanju             
Posted Date: July 13, 2011     Points: 20   

Hey in tools u have option as connect to database

den u fill some necessary details fo server name and database finally click advanced button u will find connection string der

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend