Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness violation
Message
From
25/07/2003 15:07:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Uniqueness violation
Miscellaneous
Thread ID:
00813610
Message ID:
00813610
Views:
34
I keep getting a uniqueness violation error in the following code after the insert.
				Select tparams
				Local lcSetFeature
				lcSetFeature=lcToolSet+'.'+Alltrim(cImport.ffeature)
				If !Indexseek(lcSetFeature,.F.,'tparams','setfeature')
					**fgagenum is not included in the import data
					Insert Into tparams (ftoolset,ffeature,fbase,fplus,fminus) Values ;
						(lcToolSet,cImport.ffeature,cImport.fbase_b,cImport.fplus,cImport.fminus)
				Endif
Where setfeature is a primary key.=alltrim(ftoolset)+'.'+alltrim(ffeature) filter set to .not. deleted().

First I am searching to see if the key already exists with the indexseek. Then if it does not, I insert a new one. How is uniqueness being violated. I have set exact on. It seems impossible to violate uniqueness here??
Next
Reply
Map
View

Click here to load this message in the networking platform