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.IDbConnect ion
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.OleDbComm and()
Dim rs As Int16
cmd.Connection = clsDatabase.cnD atabase
cmd.CommandType = CommandType.Tex t
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTime out = 30
rs = CInt(cmd.Execut eScalar().ToStr ing)
MsgBox(rs.ToStr ing)
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.IDbConnect ion
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.OleDbComm and()
Dim rs As Int16
cmd.Connection = clsDatabase.cnD atabase
cmd.CommandType = CommandType.Tex t
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTime out = 30
rs = CInt(cmd.Execut eScalar().ToStr ing)
MsgBox(rs.ToStr ing)
End Function
Best regards,
Jack Zhong
Comment