Hello,
I hope someone can point me to a good reference or explain what I am doing wrong here. I keep getting errors no matter what I try. I want to update a checkbox field for multible records, and I seem to get this about the ID field.
ODBC Error Code = 22005 (Error in assignment)
[Microsoft][ODBC Microsoft Access Driver]Invalid character value for cast specification (null)
The error occurred while processing an element with a general identifier of (CFUPDATE), occupying document position (53:1) to (53:80).
Here is the page:
<html>
<head>
<title>Untitled</title>
</head>
<cfparam default="false" name="url.submit">
<body>
<CFQUERY NAME="GetData" DATASOURCE="workdb">
SELECT *
FROM Contacts
WHERE Info_updates = 1
</CFQUERY>
<CFQUERY NAME="GetData2" DATASOURCE="workdb">
SELECT *
FROM MarketingLeadsMaster
WHERE Info_updates = 1
</CFQUERY>
<form action="editrec.cfm?submit=true" method="POST">
<table>
<tr>
<th>E-Mail</th>
<th>Updates Wanted</th>
<th>Company</th>
</tr>
<CFOUTPUT QUERY="GetData">
<tr>
<td>#email#</td>
<input type="Hidden" name="ID" value="#ID#">
<cfparam name="Info_updates" default="'no'">
<td><input checked type="checkbox" name="Info_updates" value="#Info_updates#"></td>
<td>#Company#</td>
</tr>
</CFOUTPUT>
<tr><td> </td></tr>
<td><input type="Submit" name="Submit" value="Update Record"></td>
<tr><td> </td></tr>
</table>
</form>
<cfif url.submit eq true>
<cfupdate datasource="workdb" tablename="Contacts" formfields="ID,Info_updates">
</cfif>
Thank you.
Val
I hope someone can point me to a good reference or explain what I am doing wrong here. I keep getting errors no matter what I try. I want to update a checkbox field for multible records, and I seem to get this about the ID field.
ODBC Error Code = 22005 (Error in assignment)
[Microsoft][ODBC Microsoft Access Driver]Invalid character value for cast specification (null)
The error occurred while processing an element with a general identifier of (CFUPDATE), occupying document position (53:1) to (53:80).
Here is the page:
<html>
<head>
<title>Untitled</title>
</head>
<cfparam default="false" name="url.submit">
<body>
<CFQUERY NAME="GetData" DATASOURCE="workdb">
SELECT *
FROM Contacts
WHERE Info_updates = 1
</CFQUERY>
<CFQUERY NAME="GetData2" DATASOURCE="workdb">
SELECT *
FROM MarketingLeadsMaster
WHERE Info_updates = 1
</CFQUERY>
<form action="editrec.cfm?submit=true" method="POST">
<table>
<tr>
<th>E-Mail</th>
<th>Updates Wanted</th>
<th>Company</th>
</tr>
<CFOUTPUT QUERY="GetData">
<tr>
<td>#email#</td>
<input type="Hidden" name="ID" value="#ID#">
<cfparam name="Info_updates" default="'no'">
<td><input checked type="checkbox" name="Info_updates" value="#Info_updates#"></td>
<td>#Company#</td>
</tr>
</CFOUTPUT>
<tr><td> </td></tr>
<td><input type="Submit" name="Submit" value="Update Record"></td>
<tr><td> </td></tr>
</table>
</form>
<cfif url.submit eq true>
<cfupdate datasource="workdb" tablename="Contacts" formfields="ID,Info_updates">
</cfif>
Thank you.
Val