
October 21st, 2002, 03:45 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 23
|
|
|
UPDATE method of Recordset to modify dbase, Win 2000
<i><b>Originally posted by : Jeanie Stewart (health@delanet.com)</b></i><br />Hi,<br />I've been using this ASP code for over a year (Win 98, IE 5.00.2314.1000) with no trouble. But lately I've been downloading my database to my laptop (Windows 2000, IE 5.00.3103.1000) and running it there too. <br />Most of the code works fine, it's just when I try to update the database using the "UPDATE method of the Recordset Object to Modify Database Records" (this is what Sam's Teach Yourself ASP book calls it, day 12), it bombs out on the Recordset.Fields.Item assignment statement with the ERROR "wrong number of arguments or invalid property assignment".<br />The same code and data work on one computer, and don't work on the other. Is there something different about the handling with Windows 2000, or does that have nothing to do with it?<br />I know there are other ways to update the database such as the SQL Update method - I use these too - but I'd rather avoid changing over the code everywhere if I could.<br />Thanks in advance,<br />Jeanie<br /><br />sample code section<br />----------------------------------------<br />Set DBConnection = Server.CreateObject("ADODB.Connection")<br />DBConnection.Open "FILEDSN=ZoneDSN.dsn"<br />Set TempRecordset = Server.CreateObject ("ADODB.Recordset")<br />TempRecordset.CursorType=1<br />TempRecordset.CursorLocation=2<br />TempRecordset.LockType=3<br />TempRecordset.ActiveConnection=DBConnection<br />TempRecordset.Source="Members"<br />TempRecordset.Filter="Club=" & Request.Form("MemberNumber")<br />TempRecordset.Open<br />TempRecordset.Fields.Item("Lastattend") = Date<br />TempRecordset.Fields.Item("Usecount") = _<br /> TempRecordset.Fields.Item("Usecount") + 1<br />TempRecordset.Update<br />TempRecordset.Close<br /><br />
|