By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

how to have a single database for a LAN and server application in vb.net

P: 2
I am developing an application VB.NET and SQL server express as backend for a hospital

management system. The application will have two parts - the vb.net application will work in LAN

and there will be a website which will be asp.net with VB. People will be able to book appointments

directly in hospital or from website. Now, my question is how to have one database for both. And

the second question is how to make the vb.net application work over LAN.
Jul 26 '13 #1
Share this Question
Share on Google+
2 Replies


100+
P: 158
Hey doctorj97, for your second question,

how to make the vb.net application work over LAN.

1) Install SQL Server Express edition in a machine which you want to act as server machine.

2) Allow TCP/IP connection in server machine. Open SQL Server Configuration Manager -> in left panel expand SQL Server [version] Network Configuration -> double click Protocols for SQLEXPRESS -> in right panel right click TCP/IP and select Enable.

3) Set exception for the port number which you're using for SQL Server in server machine.

I) Default port number is 1433. To find/set your port number, open SQL Server Configuration Manager -> in left panel expand SQL Server [version] Network Configuration -> double click Protocols for SQLEXPRESS, right click TCP/IP and select Properties -> Select IP Addresses tab -> scroll down to IP4 -> TCP Port (your port number).

II) Control Panel > Windows Firewall > Advanced settings -> Inbound Rules (in left panel) -> Select New Rule... (in Actions) -> Select Port -> Click Next -> Select TCP and Enter your SQL Server's port number (1433 default port number) -> Click Next -> Select Allow the connection -> Click Next -> Select the network types in which you want to allow set an exception -> Click Next -> Enter any name -> Click Finish.

4) Connect other computers to this server machine via your lan cable.

5) Assign unique IP address to all machines over this lan network including the server machine.

6) In your application's connection string line use Data Source as Server machine's IP Address (lan's IP address), Port Number.

Eg: Data Source=190.190.190.1,1433;

For your first question,

how to have one database for both.

1) Host your website in any server like IIS in your server machine.

2) Assign your internet's IP address (If you're using this website only in your lan network means use your server machine's lan connection's IP address. Else if you want to use apart from lan network means then assign your internet's IP address) to your website in IIS.

3) In your website's connection string line use Data Server as Server machine's IP Address , Port Number. Eg:

Data Server=190.190.190.1,1433;

4) You can browse your website using your server's IP address (internet's IP address not lan's IP address).
Jul 28 '13 #2

P: 2
@vijay6
thank you very much.I will try in this way.I hope it works for me.
Jul 28 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.