VB.NET Online Software...HELP

bhutanesedude

The Thunderer
Hello Geeks,

I am a newbie in this software programming as you would know already. So far, during my college days, I just developed STAND-ALONE Softwares, having the Backend Database in the same system where the Front-End is installed.

Today, I would like to try something different. Is there any possibilities to develop an Application using VB.NET keeping the back-end SQL DB at the Local Networked Server and Front End in client terminals? If so, can someone let me know how to connect the front end and back end? Please do help me.

The server I have in my network is Windows 2003 and client system is of Windows 7.

Thank you.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
You can simply follow the procedure you learnt. The Database should accept remote connections that's all. You don't need to change the Front End Code at all.

Say if you are using SQL Server, it accepts remote connections by default. But in case of Express version you need to configure it in such way.

You can check *www.google.co.in/search?q=Configur...s=org.mozilla:en-US:official&client=firefox-a to configure SQL Server Express to accept remote connections.

In your front end code, SQLConnection object just pass the connection string of that SQL Server Installation.

I believe you used to do one of these...

Data Source=YOUR_PC_NAME;Initial Catalog=DATABASE_NAME;User ID=USERNAME;Password=PASSWORD

Data Source=YOUR_PC_NAME;Initial Catalog=DATABASE_NAME;Integrated Security=SSPI;

Server=YOUR_PC_NAME;Database=DATABASE_NAME;Trusted_Connection=True;

You just need to replace the following with...

Data Source=REMOTE_PC_NAME/IP;Initial Catalog=DATABASE_NAME;User ID=USERNAME;Password=PASSWORD

So see it's as easy as that. Just you need to modify the code to pass remote connection string.

So you can develop a Form, from which you'll accept Database Server Name / IP, Database Name, UserID and Password and build the connection string dynamically based on that. So it'll be more generalized.
 

RCuber

The Mighty Unkel!!!
Staff member
you can install SQL Server on any networked PC/sever and have your client application connect to it.. there is no need to install Visual Studio on the server. the steps provided by krishnandu is perfect.
 
OP
bhutanesedude

bhutanesedude

The Thunderer
Most of the system connected to server are with IP and few of windows 7 PC are connected without IP allocated. Will that hamper the performance in anyway if DB is in server and used from client other Terminals?

you can install SQL Server on any networked PC/sever and have your client application connect to it.. there is no need to install Visual Studio on the server. the steps provided by krishnandu is perfect.
 

RCuber

The Mighty Unkel!!!
Staff member
No performance issues will come. SQL server handles request with same performance when accessed using IP or Machine Name
 
OP
bhutanesedude

bhutanesedude

The Thunderer
OK Thank you. Then I shall start with it. I would be dropping anything I come across. Thanks once again for all the contributions.

Regards
 
OP
bhutanesedude

bhutanesedude

The Thunderer
I believe you used to do one of these...

Data Source=YOUR_PC_NAME;Initial Catalog=DATABASE_NAME;User ID=USERNAME;Password=PASSWORD

Data Source=YOUR_PC_NAME;Initial Catalog=DATABASE_NAME;Integrated Security=SSPI;

Server=YOUR_PC_NAME;Database=DATABASE_NAME;Trusted_Connection=True;

You just need to replace the following with...

Data Source=REMOTE_PC_NAME/IP;Initial Catalog=DATABASE_NAME;User ID=USERNAME;Password=PASSWORD

Dude, I have a DBAccess file which point towards SQL DB and has the following code

Shared cs As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath.Replace("\bin\Debug", "") & "\hrims.mdf;Integrated Security=True;User Instance=True")

Now this code works perfectly when I use the SQL DB in same system of client, but now how do I code it so that the DB resides in my server and can be accessed from Client via Network connection.

Please help.
 
Top Bottom