I have a datsource I'm trying to use a SPROC for. However I get the following error when I select test query.
"There was an error executing the query. Please check the syntax of the command if present, the types and values of the parameters to ensure they are correct"
"Faild to enable constraints. One or more rows contain valules violating non-null, unique or foreign-key constraints"
I can execute the SPROC directly from SQL Management Studio and get the expected results. I do have unique and foreign keys defined in the DB.
Hi jwhitf,
This problem is usually caused by either null values being returned for columns not set to AllowDBNull, or duplicate rows being returned with the same primary key.
Try running your query natively and look at the results, if the resultset is not too large. If you've eliminated null values, then my guess is that the primary key columns is being duplicated.
If your problem still exists, please post your code for me, then I will analyze your code.
Best Regards,
Terry Guo
沒有留言:
張貼留言