Results 1 to 3 of 3

Thread: connection

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    4

    connection

    <%
    dim Conn
    dim querySQL
    OpenConnection Conn

    dim fname
    dim lname
    dim email
    dim password
    dim conPassword

    Dim url_redirect

    fname = trim(request.form("txtFirstName"))

    response.write( ""&fname)
    lname = trim(request.form("txtLastName"))
    email = trim(request.form("txtMail"))
    password = trim(request.form("txtPassword"))
    conPassword = trim(request.form("txtConPassword"))

    Dim insertSQL
    Set rsInsert = Server.CreateObject("ADODB.Recordset")

    'Insert into userdata table
    insertSQL = ""
    insertSQL = "INSERT INTO userdata("
    insertSQL = insertSQL & "First_Name"
    insertSQL = insertSQL & ", Last_Name"
    insertSQL = insertSQL & ", Email"
    insertSQL = insertSQL & ", Password"
    insertSQL = insertSQL & ", Confirm_Password"


    insertSQL = insertSQL & ") VALUES("
    insertSQL = insertSQL & "'" &fname& "'"
    insertSQL = insertSQL & ",'" &lname& "'"
    insertSQL = insertSQL & ",'" &email& "'"
    insertSQL = insertSQL & ",'" &password& "'"
    insertSQL = insertSQL & ",'" &conPassword& "'"

    rsInsert.Open insertSQL, Conn

    'url_redirect = ""
    'url_redirect = "process_result.asp?Msg=SUCCESSADD&fname=" &fname& "&lname=" &lname
    'response.redirect(url_redirect)

    CloseConnection Conn

    %>

    error message for tis code:
    Error Type:
    ADODB.Recordset (0x800A0BB9)
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.


    hi
    can help me check wat error i haf for this code??

    thanks... alot

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Cool

    YOU MISS TO CLOSE THE ) AT THE END


    insertSQL = insertSQL & ") VALUES("
    insertSQL = insertSQL & "'" &fname& "'"
    insertSQL = insertSQL & ",'" &lname& "'"
    insertSQL = insertSQL & ",'" &email& "'"
    insertSQL = insertSQL & ",'" &password& "'"
    insertSQL = insertSQL & ",'" &conPassword& "')"

    try now...........

  3. #3
    Member
    Join Date
    Sep 2002
    Location
    PAKISTAN
    Posts
    54

    Talking

    Be Good Not Bad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width