Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Permenkaret Permenkaret is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 351
Rep Power: 14
Permenkaret mempunyai hidup yang Normal
Default [ASK] Login Client Server VB6 ke SQL Server 2000 (Master VB6 Masuk)

Gan, ada yang mau share caranya login dari client ke database server pake VB6... Databasenya pake SQL Server 2000...

Kalo servernya dah bisa konek ke clientnya tapi buat login masih belum bisa..

Ane dah pake winsock buat koneksi client servernya

Scriptnya Data Arrival di form login :




Spoiler for Script Data Arrival winsock:






Private Sub Socket_DataArrival(ByVal bytesTotal As Long)

Dim Data As String

Socket.GetData Data, vbString

If Data = "sendid" Then

'If Data(0) = " & txtUser.text & " And Data(1) = " & txtPassword.text & " And Data(2) = "CBBagian.text" Then

Start_Login

Else

If Data = "sendpw" Then

Send_Password

Else

If Data = "wronglogin" Then

frmLogin.Caption = "Login Status:Wrong Id/Password/id Number"

Else

If Data = "rightname" Then

frmLogin.Caption = "Login Status:Right Name Sending Password"

Send_Password

Else

If Data = "getbagian" Then

Socket.SendData "idbagian" & CBBagian

Else

If Data = "login" Then

frmLogin.Caption = "Login Status:Loged Into Server Getting Data"

MsgBox "Server Has Been Shutdown By Forced Connections", vbCritical, "Disconnected"

frmUtama.Show

'Play_Wave "loged.wav"

Else

If Data = "dis" Then

frmLogin.Caption = "Status:Not Connected"

'ls2 = "Login Status:Not Loged In"

MsgBox "Server Has Been Shutdown By Forced Connections", vbCritical, "Disconnected"

Else



'txtLoged.SelStart = Len(txtLoged.Text)

'txtLoged.SelColor = vbBlue

'txtLoged.SelFontName = "arial"

frmLogin.Caption = Data

End If

End If

End If

End If

End If

End If

End If

End Sub











Gimana y??? Ada yang bisa kasih pencerahan???

THANKS Buat Bantuannya...





Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 08:51 PM.


no new posts