thunderain
Programmer
I am using an access database. I am trying to read my primary key, field name - intCustomerID, Data Type - AutoNumber. I am retrieving it into a form to send to the next page.
Here is the code that should work:
Response.write "<form method='post' ACTION='buttonchoice.asp'>"
while not objRec.EOF
Response.Write "<tr><center>"
Response.write "<td><center>" %>
<% Dim databaseid, id, intCustomerID %>
* <% id = CInt(objRS("intCustomerID"
) %>
<% databaseid = id %>
<input type='radio' name='customer' value= '<%=databaseid%>'<%Response.write(" checked"
%>></td>
I keep crashing on the line marked with *, getting an error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
I have tried all kinds of other lines such as:
<% id = objRS( "intCustomerID"
%>
<% id = objRS( intCustomerID) %>
<% id = CInt(objRS("intCustomerID"
) %>
<% id = cstr(objRS("intCustomerID"
) %>
No matter what I use, i get the Type Mismatch error.
Does anybody know why?
Thank you
thunderain
Here is the code that should work:
Response.write "<form method='post' ACTION='buttonchoice.asp'>"
while not objRec.EOF
Response.Write "<tr><center>"
Response.write "<td><center>" %>
<% Dim databaseid, id, intCustomerID %>
* <% id = CInt(objRS("intCustomerID"
<% databaseid = id %>
<input type='radio' name='customer' value= '<%=databaseid%>'<%Response.write(" checked"
I keep crashing on the line marked with *, getting an error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
I have tried all kinds of other lines such as:
<% id = objRS( "intCustomerID"
<% id = objRS( intCustomerID) %>
<% id = CInt(objRS("intCustomerID"
<% id = cstr(objRS("intCustomerID"
No matter what I use, i get the Type Mismatch error.
Does anybody know why?
Thank you
thunderain