troubleshooting Question

ODBC Error Code = 23000 (Integrity constraint violation)

Avatar of LelloLello
LelloLello asked on
ColdFusion Language
6 Comments3 Solutions5367 ViewsLast Modified:
My code is working fine but the insert is not going into the table why?
i'm having the following ODBC Error Code 230000

My ID is unique...

<!--- Insert a record of the Transaction in the Database --->
 						<cfquery name="InsertUserInfo" datasource="#application.datasource#" username="#application.username#" password="#application.password#" maxrows=25>
						INSERT INTO 
						tblC(dteDate, Name, Amount, Confirmation_Num, Invoice, CardNum, Data, Event)   
						Values('#DateFormat(NOW())#','#strBadgeName#','#intTotal#',
						<cfif CreditCard EQ "Yes"> 
						'#RESULT#',
						'#intReceiptID#',
						'#Mid(Form.intCardNo, 1, Len(Form.intCardNo)-4)#',				
						<cfelse>
						'','','',
						</cfif>
						'#text_to_insert#', 'CIA Network Subscription 2012') 
						
						</cfquery> 

My SQL Table

id  int  not allow nulls
dteDate datetime allownulls
name varchar 255 allow nulls
amount
Confirmation_num
Invoice
CardNum
Data
Event
Twelvedigits varchar50
ASKER CERTIFIED SOLUTION
gdemaria

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros