If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > help with asp and mysql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-03, 16:13
nightinvid nightinvid is offline
Registered User
 
Join Date: Sep 2003
Location: Mexico
Posts: 1
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")
myconn.open (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.open
objRecordset.AddNew
objRecordset.Fields("nombre") = Request.Form("txtNombre")
objRecordset.Fields("ciudad") = Request.Form("txtCiudad")
objRecordset.Update


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??
Reply With Quote
  #2 (permalink)  
Old 11-17-03, 17:45
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Please post the definition of your table - Also, what is in the text fields on the form ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On