J
Jak
I think I have set all the required parameters of the oledbcommand already,
but the procedure still refuse to proceed, it sayes that there must be one
or more parameters not set.
The following is the snippet of my codes:
'-----------------Interface----------------
Public Interface IDatabase
......
ReadOnly Property cnDatabase() As Data.IDbConnection
End Interface
'------------------class login-----------------------
Dim clsDatabase As IDatabase
Private Function Validate(ByVal User As String, ByVal Password As
String) As Boolean
Dim cmd As New OleDb.OleDbCommand()
Dim rs As Int16
cmd.Connection = clsDatabase.cnDatabase
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTimeout = 30
rs = CInt(cmd.ExecuteScalar().ToString)
MsgBox(rs.ToString)
End Function
Best regards,
Jack Zhong
but the procedure still refuse to proceed, it sayes that there must be one
or more parameters not set.
The following is the snippet of my codes:
'-----------------Interface----------------
Public Interface IDatabase
......
ReadOnly Property cnDatabase() As Data.IDbConnection
End Interface
'------------------class login-----------------------
Dim clsDatabase As IDatabase
Private Function Validate(ByVal User As String, ByVal Password As
String) As Boolean
Dim cmd As New OleDb.OleDbCommand()
Dim rs As Int16
cmd.Connection = clsDatabase.cnDatabase
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTimeout = 30
rs = CInt(cmd.ExecuteScalar().ToString)
MsgBox(rs.ToString)
End Function
Best regards,
Jack Zhong