problem on getting oledbcommand worked

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jak

    #1

    problem on getting oledbcommand worked

    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


  • Armin Zingler

    #2
    Re: problem on getting oledbcommand worked

    "Jak" <cnlohmann@yeah .netschrieb
    cmd.CommandText = "Select count(*) from TLOGIN Where
    LoginID='" + User + "' AND Passowrd='" + Password + "';"
    "Password", not "Passowrd"



    Armin

    Comment

    • Cor Ligthert [MVP]

      #3
      OT Re: problem on getting oledbcommand worked

      Hi Armin,

      I am glad to see you back again, whatever you think about OT post.

      :-)

      Cor

      "Armin Zingler" <az.nospam@free net.deschreef in bericht
      news:e3gAOA%23O HHA.4368@TK2MSF TNGP03.phx.gbl. ..
      "Jak" <cnlohmann@yeah .netschrieb
      > cmd.CommandText = "Select count(*) from TLOGIN Where
      >LoginID='" + User + "' AND Passowrd='" + Password + "';"
      >
      "Password", not "Passowrd"
      >
      >
      >
      Armin

      Comment

      • Jak

        #4
        Re: problem on getting oledbcommand worked

        Oh, I did not find this typing mistake in the code. ^_^ . Thank you very
        much.

        Best regards,

        Jack Zhong


        Comment

        Working...