vb 如何远程判断用户名密码?
VB + mysql数据库 做一个登录界面 是C/S 模式 我的服务端已经打开 但是只能实现本地验证 如何实现远程验证呢?
Private Gac() As Boolean Dim Socknumber As Integer Private Sub Form_Load() Winsock1(0).LocalPort = 1600 Winsock1(0).Listen Socknumber = 0 End Sub Private Sub Form_Unload(Cancel As Integer) Winsock1(0).Close End Sub Private Sub Winsock1_Close(Index As Integer) Winsock1(Index).Close Unload Winsock1(Index) Gac(Index) = False Text1.Text = Int(Text1.Text) - 1 End Sub Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long) Socknumber = Socknumber + 1 Load Winsock1(Socknumber) Winsock1(Socknumber).Accept requestID ReDim Preserve Gac(Socknumber) Gac(Socknumber) = True Text1.Text = Int(Text1.Text) + 1 End Sub Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim c As String Winsock1(Index).GetData c, vbString Dim i As Integer For i = 1 To UBound(Gac) If Not i = Index Then If Gac(i) Then Winsock1(i).SendData c DoEvents End If End If Next i End Sub
cn.Open "DRIVER={MySQL ODBC 5.3 Unicode Driver};" & _ "SERVER=192.168.191.4;" & _ "DATABASE=data;" & _ "UID=root;" & _ "PASSWORD=root;" & _ "OPTION=3"本机测试 是连接上了 但是 用别的机器 就显示 未发现数据源名称