Strange Exceptions

  • Thread starter Thread starter Ciro Fonseca
  • Start date Start date
C

Ciro Fonseca

Hi there!!!

Whell, I'm having a strange problem with Exceptions when
i'm working with Threads in the ThreadPool and acessing a
SQL Server DataBase...

Sometimes during the execution of the program, a exception
is thrown in the line that executes some SQL in the
Database, but the strange think is that the Description of
the exception don't have nothing to do with my Sql
Command.... for example: I'm selecting a row from the
database:

"select * from pubs"

but the error that is returned to me, is someting like:

" INSERT statement conflicted with COLUMN FOREIGN KEY
constraint 'FK_Clients' The conflict occurred in
database 'Test', table 'Clients'"

You see? very strange, don't you think?
what the table Clients have to do with pubs? and
why "Insert Statement" if I don't even wrote a "Insert"
command?

Some help?

Thanks in Advance...

[]'s
Ciro Fonseca
 
If you are not using the Test database intentionally, then this smells of
sume test code executing somewhere without you knowing it.

Try stepping through the program to determine the exact line of code that
accesses the database and check the value of all variables and Sql-related
objects.

Regards,

Ziga Jakhel
 
Back
Top