Use cfqueryparams in your query -or- #val(url.field2)#
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-----Original Message-----
From: cftalk_list [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 12:37 PM
To: CF-Talk
Subject: Very Odd SQL behavior using Access

Hello cf-talk,

Hi Everyone,

I've got a form that adds registration data to an Access database (clients
request).

It has a few number fields, each set to long interger and none required. The
form passes the info using "GET" via URL. Now, if the form fields (number)
are filled in, all is fine. If one or more of the form fields (number) are
left blank, I get a Syntax Error in INSERT INTO statement. 

It appears that the INSERT INTO just won't process the empty field.

Looking at part of a passed URL:
&field1=&field2=4 
-so, I would this indicate that a blank field would cause my field1 info to
be "&field2=4"?? I thought this might be a clue, but the error shows my SQL
to have just two commas where my field1 info should be.

I'm just stumped. 

Any suggestions? What the heck is going on!    

-- 
Best regards,
Jeff






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228883
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to