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

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Database Connectivity

Posted By: Ruchi     Posted Date: March 12, 2010    Points:2   Category :VB.Net
Hi ..

How can i set path of Database file which is currently placed in my Project's Database folder in Global connection String defined in Module? I do not want to use an DSN connection so any alternate to that ?

Author: Lalij Mer             
Posted Date: March 12, 2010     Points: 5   

you will get here


Please Check my answer if you help....
Thank You...

Author: Syed Shakeer Hussain             
Posted Date: March 13, 2010     Points: 5   
Author: balram             
Posted Date: March 15, 2010     Points: 5   


if your database is placed in app_data folder of you main application and suppose you database file name is test.mdb then you can write
Application.StartupPath + "app_data\test.mdb"

but you have to place this folder in you bin folder of application for running bcoz when you run the application from IDE application.startup path return you bin folder path where you exe is build.
after deploying setup it works fine.


Author: Ruchi             
Posted Date: March 15, 2010     Points: 5   

i shall try your solution.

Author: duraikannan             
Posted Date: December 14, 2010     Points: 5   

DataBase Connection String:

Dim SqlConn as new SQLConnection("Server=ServerName;Database=DbTest;UID=sa;Pwd=test")

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

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