is it this is what u means??
still login fail with correct id and password woh...
Dim myCommand As New OdbcCommand("SELECT COUNT(*) FROM empdetail WHERE Employee_ID = @ID AND Epass = @Password", conn)
myCommand.Parameters.Add("@ID", OdbcType.Int).Value = CInt(Me.TextBox1.Text)...
in database have a table name empdetail( Employee_ID, Empname, Epass)
1 user( 1001, Lee, 1111)
Dim myData As New DataSet
Dim SQL As String
Dim myAdapter As OdbcDataAdapter
Dim conn As OdbcConnection
Dim acc As Data.DataRow
Dim a As OdbcCommandBuilder
conn = New OdbcConnection...
okok...
next time i will remember to put the error message..
i have a new problem...
when i add in the conn.open and conn close
is no problem in "If CInt(myCommand.ExecuteScalar()) = 0 Then"
but when i run and type correct id and password to login
it still shows
"Login Fail."
thanks for ur help...
is it correct??
but when i run it
it come out some error
=>> "If CInt(myCommand.ExecuteScalar()) = 0 Then"
Dim myData As New DataSet
Dim SQL As String
Dim myAdapter As OdbcDataAdapter
Dim conn As OdbcConnection
Dim acc As Data.DataRow
Dim a As OdbcCommandBuilder
conn = New...
hi~~
can i ask u what the <your connection here> i should put?
isi it below connection??
"DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;" & _
"DATABASE=seas;" & _
"UID=root;" & _
"PASSWORD=;"...
i think i make some mistake...
what i want is not login to the whole mysql server
for example i have a database name:SEAS
inside has a table(Empdatail) in the table has two fields(ID, password)
now in client side the user want to login to sys based on ID and password
when user keyin ID,password...
________________
|O Lee |
|O Dee |
|O santi |
|O xue |
|O Gan | <checklistbox
--------------------
Now i choose LEE, santi, xue and i click save
in database timetable3 must add in the record
Employee_ID Date...
i'm doing a scheduling app
there all two type of user(manager and employee)
now the manager want hold a group meeting which include only part of employees
so i need to do like the manager can choose the ppl who are need to attend the meeting
so i use a checkedlistbox that get all the employee...
how about if i use this code??
but it still come out some error...
seems is sql problem
Dim myCommand As New OdbcCommand
Dim myData As New DataSet
Dim SQL As String
Dim myAdapter As OdbcDataAdapter
Dim conn As OdbcConnection
Dim acc As Data.DataRow
Dim a As OdbcCommandBuilder...
can u check for me pls...
is it correct?
wat the forma actually put?
before that i put in Empname but pop out some error
"ERROR[42000][MySQL][ODBC 3.51 Driver][mysql-4.1.11-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right...
above is the code i retrieve the data into checkedlistbox...
than now incheckedlistbox got 8 name
aaa
bbb
ccc
ddd
eee
ffff
ggg
hhh
i select 3 names inside(aaa,ccc,ggg)
when i click save
will save to a table name timetable
example:
ID Name Event
101 aaa group...
This is the code that how i add item into checkedlistbox....
Dim myCommand As New OdbcCommand
Dim myData As New DataTable
Dim SQL As String
Dim myAdapter As New OdbcDataAdapter
Dim conn As OdbcConnection
CheckedListBox1.Items.Clear()
conn = New OdbcConnection...
i'm doing a scheduling app
now i want to choose only few ppl to attend a group meeting
The name inside the checkedlistbox is retrieve from database based on how many user in database.
now let say in checkedlistbox got ten user name
but i only choose three user
and when i click save..
i need to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.