Connection BD C# Sqlite

Asked

Viewed 830 times

3

I have a small application on C# where the database was established in the SQLite, initially to run only locally. But now I need it running on 2 other machines besides the server. I thought about leaving a shared folder on the network and a shortcut on the other stations pointed to the folder; I know the limitations of the SQLite, but the other machines will only read, will not change anything in the database! The question is: How do I make the connection string point to the pc that will be the server?

I tried to set the connection string like this: "\\ip_servidor\c$\pastaBd" but it didn’t work out! I’ve checked the shared folder permissions, but it’s all ok! But it never recognizes the BD.

  • I do not know how to proceed the way you are talking, if I were you would put the server on an online SQL server (has for free, and also has a very cheap)

2 answers

1

You will not be able to access the remote folder directly from C#. To do this, you need to modify the folder on your computer, and access it from the mapped address.

Example: Make a folder mapping "\\ip_servidor\c$\pastaBd" for an available disk drive letter such as "X:". After that, in your connection string use the unit "X:\" on the site of "\\ip_servidor\c$\pastaBd".

At first that is, I use this solution in my work without any problem.

0

  • http://answall.com/q/2371/101

Browser other questions tagged

You are not signed in. Login or sign up in order to post.