Hi, I'm currently having problem with my proj. And really need helps..
I am currently in a proj that need to create an application that is able to hav Client (PC 1)'s data store to Server (PC 2 and it is also where the database is being stored.)
PC 1's Code:
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim connAdd As New SqlConnection _
("data source=ifcdu1-ws23\sqlexpress; initial catalog=PatientInfo;" & _
"integrated security=true")
Dim mySQL As String
connAdd.Open()
mySQL = "insert into pInfo (patientName, address, contactNo, gender, condition) values ('" & Trim(txtPName.Text) & "','" & Trim(txtAddress.Text) & "','" & Trim(txtContact.Text) & "','" & Trim(cbGender.Text) & "','" & Trim(txtCondition.Text) & "' ) "
Dim cmdAdd As New SqlCommand(mySQL, connAdd)
cmdAdd.ExecuteNonQuery()
connAdd.Close()
End Sub
End Class
* Application is using VB, Database is using MS SQL Server.
FYI: changing datasource to PC 1's name and by transfering the database to PC 1, it is able to do a peer-to peer connection.
What should I do to Server PC 2 or Client PC 1? Any configuration or do I hav to change any coding to make it works?
thank lots (: