ฝั่ง ลูก
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim m As New mobile.WebService
m.selectmathod(TextBox1.Text)
End Sub
ฝัง Server
<WebMethod()> _
Public Function selectmathod(ByVal txt As String) As DataSet
Dim conn As New SqlConnection
conn.ConnectionString = "server=NOCTIS\SQLEXPRESS;UID=sa;PWD=uii;DATABASE=Data"
Dim cmd As String = "select * from T_Datain where F1='" & txt & "'"
Dim da As New SqlDataAdapter(cmd, conn)
Dim ds As New DataSet()
da.Fill(ds, "dsfill")
Return ds
End Function