ASP Parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jpchenot
    New Member
    • Jun 2008
    • 1

    #1

    ASP Parameters

    Hi guys. When executing the following code, i get this error:

    Microsoft VBScript runtime error '800a01b6'

    Object doesn't support this property or method: 'sqlRegistrantU ser.Paratemers'

    /register.asp, line 211

    Anyone can help please. I am a asp.net developer and i don't understand why this is happening.
    Code:
       
    Set conn = server.CreateObject("ADODB.Connection")
    Set sqlRegistrantUser = server.CreateObject("ADODB.Command")
    Set objparam = server.CreateObject("ADODB.Parameter")
    conn.ConnectionString = Application ("ALloyd")
    conn.Open
    sqlRegistrantUser.CommandText = "dbo.usp_InsertRegisteredUser"
    sqlRegistrantUser.CommandType = adCmdStoredProc
    sqlRegistrantUser.ActiveConnection = conn
     
    Set objparam = sqlRegistrantUser.CreateParameter("@titleChecked", adVarChar, adParamInput, 4, titleChecked)
    sqlRegistrantUser.Paratemers.Append objparam 
    Set objparam = sqlRegistrantUser.CreateParameter("@firstNameChecked", adVarChar, adParamInput, 50, firstNameChecked)
    sqlRegistrapntUser.Paratemers.Append objparam 
    Set objparam = sqlRegistrantUser.CreateParameter("@lastNameChecked", adVarChar, adParamInput, 50, lastNameChecked)
    sqlRegistrantUser.Paratemers.Append objparam 
    Set objparam = sqlRegistrantUser.CreateParameter("@emailChecked", adVarChar, adParamInput, 200, emailChecked)
    sqlRegistrantUser.Paratemers.Append objparam 
    Set objparam = sqlRegistrantUser.CreateParameter("@passwordChecked", adVarChar, adParamInput, 50, passwordChecked)
    sqlRegistrantUser.Paratemers.Append objparam 
     
    sqlRegistrantUser.Execute 
     
    Set conn = Nothing
    Set sqlRegistrantUser = Nothing
    Set objparam = Nothing
    Last edited by DrBunchman; Jun 26 '08, 11:43 AM. Reason: Added code tags - Please use the # button
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    Do you have these at the top of your .aspx page in which you are working with?

    <% @Import Namespace="Syst em.IO" %>
    <% @ Import Namespace="Syst em.Data" %>
    <% @ Import Namespace="Syst em.Data.SqlClie nt" %>

    That is required to import the librarys needed for your code. I think the 3rd one is all you need but the other 2 are also for some pretty basic functions.

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Could you clarify please? you state you are an ASP.NET developer, but your error message appears to come from an ASP page. Is this ASP or ASP.NET? (The file extension for ASP.NET should be .aspx)

      Jared

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        Originally posted by jpchenot
        Code:
           
        sqlRegistrantUser.Paratemers.Append objparam
        Maybe the issue is that you misspelled "Parameters ".

        Jared

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          Originally posted by jhardman
          Maybe the issue is that you misspelled "Parameters ".

          Jared
          Nice catch. I never would have noticed that.

          Comment

          Working...