Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003

    Unanswered: help with asp and mysql

    hi all!!!!

    i have a little problem when i insert rows in a mysql database with asp, the error is :

    ADODB.Recordset (0x800A0BB9)
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
    /asp/addUser.asp, line 29

    the code is :
    dim strDbConn, strSQL
    strDbConn="Driver={MySQL ODBC 3.51 Driver};server=localhost;Port=3306;uid=root;passwo rd=mysqlpass;database=pruebasp"'
    set myconn = server.createobject("adodb.connection") (strdbconn)
    Dim objRecordset
    Set objRecordset = Server.CreateObject("ADODB.Recordset")

    strSQL= "select * from datos"

    objRecordset.Source = "datos"
    objRecordset.ActiveConnection = myconn
    objRecordset.cursortype = adOpenKeyset
    objRecordset.LockType = adLockOptimistic
    objRecordset.Fields("nombre") = Request.Form("txtNombre")
    objRecordset.Fields("ciudad") = Request.Form("txtCiudad")

    i believe that the error is the objRecordset.ActiveConnection but i change myconn (connection object) by strdbconn (connection string) but the same error appear. Could everyone help me??

  2. #2
    Join Date
    Feb 2002
    Please post the definition of your table - Also, what is in the text fields on the form ?

Posting Permissions

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