[thelist] ASP, Access and data types

Jennifer Bantz jbantz at abc-pershing.com
Tue Oct 10 12:13:17 CDT 2000


Hi All,

I'm going crazy here...

I am trying to update a record in an Access database from a web page like
so:

SQL="UPDATE documents SET title = '" & title & "', "
SQL=SQL & "authorID = " & authorID & " "
SQL=SQL & "body = '" & body  & "' "
SQL=SQL & "WHERE docID =" & docID

I'm getting a "data type mismatch" error because the docID in the database
is an AutoNumber, while the docID from the page is a string (it actually
comes from the database, then becomes a string when I assign it to a
variable -- if I try to use the value straight out of a query I still get a
data type mismatch).

Am I missing something?  Seems to me that having Access assign autonumbers
would be the common way to identify unique records, especially ones created
by visitors to the site, yet trying to write back to the database by
matching to them would always generate a data type mismatch.

Help??

TIA,
Jenn





More information about the thelist mailing list