![]() ![]() You can get then look at the RowError for each of these, which should tell you the column that's invalid along with the problem. This will show you all datarows which have an error. Then within the command window, call GetErrors method on the table getting the error.įor C#, the command would be ? dataTable.GetErrors()įor VB, the command is ? dataTable.GetErrors Or, to see the exact error, you can manually add a Try/Catch block to the generated code like so and then breaking when the exception is raised: If you've eliminated null values, then my guess is that the primary key columns is being duplicated. Try running your query natively and look at the results, if the resultset is not too large. size of char fields) between the database and the dataset duplicate rows being returned with the same primary key.null values being returned for columns not set to AllowDBNull.This problem is usually caused by one of the following So I solve my problem by replacing e.eval to, NVL (e.eval,'') eval.and this solves my problem. ? dt.GetErrors() RowError: "Column 'eval' does not allow DBNull.Value." ![]() The primary key is (batch_no, crsnum, lect_code). The problem happens with the table cc1assiscrseval. ![]() The second table I make the outer join on contains a composite primary key which are null in the previous outer join query.ĮDIT: SELECT UNIQUE a.crs_e, a.crs_e || '/ ' || a.crst crs_name, b.period,ī.crscls, c.crsday, c.from_lect, c.to_lect,Ĭ.to_lect - c.from_lect + 1 Subtraction, c.lect_kind, e.eval, e.batch_no,įROM rlm1course a, rfc14crsgrp b, ckj1table c, mnltablelectev d, ![]() I know the problem, but I don't know how to fix it. Violating non-null, unique, or foreign-key constraints. I make an outer join and executed successfully in the informix database but I get the following exception in my code: DataTable dt = TeachingLoadDAL.GetCoursesWithEvalState(i, bat) įailed to enable constraints. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |