0

I am creating a windows application in vb.net with a central database on an network Server

How to map the server path in vb.net.

Regards Megha

Grim
  • 672
  • 4
  • 17
mega
  • 1
  • 3
  • why you need to map the server ?? instead of doing that you can access the database in your server computer over LAN ?? you have to tell more about your working environment (database,os,and the framework etc) – Vivek S. Jul 28 '14 at 10:42
  • my database is in server.. – mega Jul 28 '14 at 10:45
  • since your comment and question is not clear i can only say that ... first you turn off firewall on all computers(including server), share folder in which your database is present and try to connect it with tour client computer(s) – Vivek S. Jul 28 '14 at 10:47
  • we use this coe in asp.net to map our database "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("App_Data\CRM.mdb"). How to use it in vb.net windows application. – mega Jul 28 '14 at 10:53
  • `Provider=Microsoft.Jet.OLEDB.4.0;Data Source="D:\folder\CRM.mdb"` – Vivek S. Jul 28 '14 at 10:59
  • I think you're looking for how to add and get a connectionstring into the app.config file: Similiar SO post http://stackoverflow.com/questions/6536715/get-connection-string-from-app-config – Brett Caswell Jul 28 '14 at 12:26
  • you can use UNC address pathing "\\SERVERNAME\C$\FOLDER" your app will need the proper network credentials to do this of course – Brett Caswell Jul 28 '14 at 12:28

1 Answers1

0

You could save the Path in registry or an .udl file saved in your application folder.

For registry way show: VB.net registry

Here is a tutorial tutorial for OLEDB Connections in VB.net

Nik Bo
  • 1,410
  • 2
  • 17
  • 29