Bhutanesedude
New member
- Joined
- Jun 12, 2013
- Messages
- 4
- Programming Experience
- Beginner
Dear Experts,
Please help me to connect a Frontend to a Backend which is on a LAN Server. I am using this DBAccess Code to connect the Frontend and Backend on standalone application.
------------------------------------------
Public Class DBAccess
Shared cs As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath.Replace("\bin\Debug", "") & "\ims.mdf;Integrated Security=True;User Instance=True")
Public Shared Function SaveData(ByVal qry As String) As Boolean
Dim cmd As New SqlCommand(qry, cs)
Try
cs.Open()
cmd.ExecuteNonQuery()
Return True
Catch ex As Exception
Return False
Finally
cs.Close()
End Try
End Function
------------------------------------------------------------------
Now I want that same project to run on LAN Server basis where the front end will be installed on Client PC and Central database will be on LAN Server.
Please help me.
Thank you
Please help me to connect a Frontend to a Backend which is on a LAN Server. I am using this DBAccess Code to connect the Frontend and Backend on standalone application.
------------------------------------------
Public Class DBAccess
Shared cs As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath.Replace("\bin\Debug", "") & "\ims.mdf;Integrated Security=True;User Instance=True")
Public Shared Function SaveData(ByVal qry As String) As Boolean
Dim cmd As New SqlCommand(qry, cs)
Try
cs.Open()
cmd.ExecuteNonQuery()
Return True
Catch ex As Exception
Return False
Finally
cs.Close()
End Try
End Function
------------------------------------------------------------------
Now I want that same project to run on LAN Server basis where the front end will be installed on Client PC and Central database will be on LAN Server.
Please help me.
Thank you