sudani1969
Member
- Joined
- Sep 25, 2009
- Messages
- 13
- Programming Experience
- Beginner
hi everyone
it is me again
i'm using VS2010 to design small program i joined 2 tables using the Dataset Designer i manged to link t1 and t2 and produce a table t3 with my selection statement, I managed to produce it through a Tabledatadapter
i want from that dataset to extract information to suit my following code but so far i could only managed what is in Row(0) from that table
ANY ONE COULD HELP TO SEE IF I CAN CHECK FOR THE WHO ROWS OF THAT TABLE MY CODE IS BELOW@
Case "user"
con.open()
Dim sql As String
'
Dim dss As New attendanceDataSet1
Dim ct As New attendanceDataSet1TableAdapters.dr1
Dim inc As Integer = 0
Dim sqDR As MySqlDataReader
Dim cmm As New MySqlCommand
Dim dr As MySqlDataReader
ct.Fill(dss.t1)
If dss.t1.Rows(0).Item(1) = txtUser.Text Then
MsgBox("Stop")
Else
cmd.Connection = con
cmd.CommandText = ("insert into login_details (user, date, login,ComputerIPAddrees) values((SELECT id FROM users WHERE username = '" & txtUser.Text & "'),CURDATE(),CURTIME(),'" & strHostName & "')")
dr = cmd.ExecuteReader()
' dr.Read()
' Dim switch As New user_attendance
txtUser.Clear()
txtPass.Clear()
txtUser.Focus()
End If
con.close() '
End Select
it is me again
i'm using VS2010 to design small program i joined 2 tables using the Dataset Designer i manged to link t1 and t2 and produce a table t3 with my selection statement, I managed to produce it through a Tabledatadapter
i want from that dataset to extract information to suit my following code but so far i could only managed what is in Row(0) from that table
ANY ONE COULD HELP TO SEE IF I CAN CHECK FOR THE WHO ROWS OF THAT TABLE MY CODE IS BELOW@
Case "user"
con.open()
Dim sql As String
'
Dim dss As New attendanceDataSet1
Dim ct As New attendanceDataSet1TableAdapters.dr1
Dim inc As Integer = 0
Dim sqDR As MySqlDataReader
Dim cmm As New MySqlCommand
Dim dr As MySqlDataReader
ct.Fill(dss.t1)
If dss.t1.Rows(0).Item(1) = txtUser.Text Then
MsgBox("Stop")
Else
cmd.Connection = con
cmd.CommandText = ("insert into login_details (user, date, login,ComputerIPAddrees) values((SELECT id FROM users WHERE username = '" & txtUser.Text & "'),CURDATE(),CURTIME(),'" & strHostName & "')")
dr = cmd.ExecuteReader()
' dr.Read()
' Dim switch As New user_attendance
txtUser.Clear()
txtPass.Clear()
txtUser.Focus()
End If
con.close() '
End Select