Forums
This topic is locked
Error on update
25 Jul 2006 21:09:46 Ron Bolin posted:
DW8 | Javascript ASP | Assess through DSNI use DW quite a bit but not the application building.
My search works to return page to edit. Data is displayed. Changes are allowed on the page. Then clicking on the Update button crashes.
The connection checks (in DW8), and so does recordset with any values tried.
This is the error message:
<i>ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current operation.
/sands2/IDresultsToEdit.asp, line 173</i>
When I see "type" I'm thinking numeric vs. text. Is that the correct approach? The field display for ID is displayed as text. It is in the database as a long integer numeric, an autonumber. Whatever I do to it in the EDIT page is the same - as far as I know - as what I do in the SEARCH page and in any of the VIEW pages that I have.
Here's the code where the error occurs in Line 173:
MM_editCmd.Parameters.Append(MM_editCmd.CreateParameter("param150", 5, 1, -1, (String(Request.Form("MM_recordId") != "undefined" && String(Request.Form("MM_recordId") != "" ? Request.Form("MM_recordId" : null)); // adDouble
I don't know what MM_recordId is. Well, I know it's a variable generated by DW here:
(from just before the end of the form)
<b>*</b>input type="hidden" name="MM_update" value="form1">
<b>*</b>input type="hidden" name="MM_recordId">
<b>*</b>input type="hidden" name="MM_recordId" value="<b>*</b>%= rsEditSandS.Fields.Item("id".Value %>">
<b>(could not get code to display so replaced the less than symbol with * above) </b>
Is one of the last two a duplicate that I should eliminate?
On the Update Record panel, it shows as ID with a check in the box for numeric. In the DB, it is unique (I checked).
Any help or comments would be appreciated. Any thing about this might give me a clue were to look for something wrong.
Code validates in DW HTML 4.0. No errors or warnings found.
Prior to this problem, the SEARCH was failing with EOF BOF error because the first id was not equal to 1. I found the code for that and changed the default to 12 (id of first record). I could add a fake record 1 in the DB if that might help. I do not want to renumber the IDs sequentially because about 100 users have recorded numbers of records to retieve by id.
Replies
Replied 26 Jul 2006 02:02:39
26 Jul 2006 02:02:39 Ron Bolin replied:
Problem solved. It was a duplicate and deleting it fixed the problem. I was also told that the shorter one was incomplete. Either way, deleting the one that did not have the value link was the answer.