Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with a simple cfquery insert

Status
Not open for further replies.

gtbikerider

Technical User
May 22, 2001
81
0
0
GB
I'm using the following code to insert into an Access db...

<cfquery datasource="dsn" name="subscribe">
INSERT INTO email_addresses
(listID,
emailaddress)
VALUES
('1',
'#Form.emailaddress#')
</cfquery>

But I get the error...

"Error casting an object of type to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed"

(ListID is a field of type "number" and emailaddress is type "text")

I get the same error on a local machine and a live server.

Any ideas what's wrong?

--
John
 
if ListID is a numeric column, why are you trying to insert a string? try removing the single quotes :)

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top