Click here to Skip to main content
15,886,137 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalsome thing Pin
x200712-Apr-08 4:05
x200712-Apr-08 4:05 
QuestionWTF? Pin
pmarfleet12-Apr-08 4:46
pmarfleet12-Apr-08 4:46 
GeneralRe: some thing Pin
Marc Soleda12-Apr-08 5:58
Marc Soleda12-Apr-08 5:58 
QuestionWhere is APIs in VB9? Pin
DigiMyth12-Apr-08 3:55
DigiMyth12-Apr-08 3:55 
GeneralRe: Where is APIs in VB9? Pin
pmarfleet12-Apr-08 4:45
pmarfleet12-Apr-08 4:45 
GeneralRe: Where is APIs in VB9? Pin
DigiMyth12-Apr-08 4:51
DigiMyth12-Apr-08 4:51 
GeneralRe: Where is APIs in VB9? Pin
pmarfleet12-Apr-08 5:00
pmarfleet12-Apr-08 5:00 
Generalnow update query problem..hep Pin
Member 444291612-Apr-08 0:29
Member 444291612-Apr-08 0:29 
hi.stil me again..ya..so funny...i can store login time..but can't update logout time..can help..?thanks
Dim Emp_IDDataRow As DataRow<br />
        Dim Encryption As String<br />
        Dim i As Integer<br />
        Comdataset = Com.getCOMDataset<br />
        Encryption = ""<br />
        Emp_IDDataRow = Comdataset.EMPLOYEE_DETAIL.FindByEmp_ID(txtID.Text)<br />
<br />
        If Emp_IDDataRow IsNot Nothing Then<br />
            For i = 1 To Len(txtPass.Text)<br />
                Encryption = Encryption & Chr(Asc(Mid(txtPass.Text, i, 1)) + 3)<br />
            Next<br />
            If txtPass.Text = Emp_IDDataRow!Password.ToString Then<br />
                LoginTime = Format(Date.Now, "HH:mm:ss")<br />
                strID = txtID.Text<br />
                LoginDate = Format(Date.Today, "dd/MM/yyyy")<br />
                Me.LOGIN_OUTTableAdapter.InsertLogin(LoginTime, strID, LoginDate)<br />
                MessageBox.Show("Login Successful!", "infor", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
                frmMenu.Show()<br />
<br />
                If Encryption = Emp_IDDataRow!password.ToString And txtID.Text.ToUpper.StartsWith("TM") Then<br />
                    MessageBox.Show("Welcome, " & Emp_IDDataRow!name.ToString, "Welcome", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)<br />
                    frmMenu.Show()<br />
                ElseIf Encryption = Emp_IDDataRow!password.ToString And txtID.Text.ToUpper.StartsWith("LM") Then<br />
                    MessageBox.Show("Welcome, " & Emp_IDDataRow!name.ToString, "Welcome", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)<br />
                    frmPurchase.Show()<br />
                    txtID.Focus()<br />
                    txtPass.Focus()<br />
                    txtID.SelectAll()<br />
                    txtPass.SelectAll()<br />
                End If<br />
            Else<br />
                MessageBox.Show("Invalid Password", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
                txtID.Focus()<br />
                txtPass.Focus()<br />
                txtID.SelectAll()<br />
                txtPass.SelectAll()<br />
            End If<br />
        Else<br />
            MessageBox.Show("Invalid ID!", "ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
            txtID.Focus()<br />
            txtPass.Focus()<br />
            txtID.SelectAll()<br />
            txtPass.SelectAll()<br />
        End If<br />
<br />
    End Sub


INSERT INTO LOGIN_OUT
(Time_login, Emp_ID, Logindate)
VALUES (?, ?, ?)

i set time login emp id and logindate as primary key

UPDATE LOGIN_OUT
SET Time_logout = ?
WHERE ('Time_login' = ?) AND ('Emp_ID' = ?) AND ('Logindate' = ?)
it add same column in Time_login but not in time_logout
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 0:33
protectorChristian Graus12-Apr-08 0:33 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 0:37
Member 444291612-Apr-08 0:37 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 0:40
protectorChristian Graus12-Apr-08 0:40 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 0:44
Member 444291612-Apr-08 0:44 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 0:50
protectorChristian Graus12-Apr-08 0:50 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 0:52
Member 444291612-Apr-08 0:52 
GeneralRe: now update query problem..hep [modified] Pin
Member 444291612-Apr-08 1:46
Member 444291612-Apr-08 1:46 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 14:16
protectorChristian Graus12-Apr-08 14:16 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 15:14
Member 444291612-Apr-08 15:14 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 15:54
protectorChristian Graus12-Apr-08 15:54 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 15:58
Member 444291612-Apr-08 15:58 
Questionaddnew in array database [modified] Pin
inderabangsawan11-Apr-08 22:05
inderabangsawan11-Apr-08 22:05 
GeneralRe: addnew in array database Pin
Christian Graus11-Apr-08 22:30
protectorChristian Graus11-Apr-08 22:30 
QuestionRe: addnew in array database [modified] Pin
inderabangsawan12-Apr-08 4:02
inderabangsawan12-Apr-08 4:02 
GeneralRe: addnew in array database Pin
Dave Kreskowiak14-Apr-08 2:59
mveDave Kreskowiak14-Apr-08 2:59 
Questionhow i can close all opened forms in my application when user want to logout and switch to new login? Pin
r_mohd11-Apr-08 19:31
r_mohd11-Apr-08 19:31 
GeneralRe: how i can close all opened forms in my application when user want to logout and switch to new login? Pin
Dave Kreskowiak12-Apr-08 3:49
mveDave Kreskowiak12-Apr-08 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.