Handle SQL Adapter Exception

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Btvn (Btvn_at_discussions.microsoft.com)
Date: 07/01/04


Date: Thu, 1 Jul 2004 02:07:01 -0700

Now, I am trying to develop and orchestration which is using SQL adapter for inserting the records in DB. It works very well as long as data is valid. I provided invalid data which voilates Primary Key constraint. Biztalk logged into Event Viewer's Application Log with following warning message:

------------------Warning 1---------------------
The adapter "SQL" raised an error message.
Details "HRESULT="0x80040e2f" Description="Violation of
PRIMARY KEY constraint 'PK_Student'. Cannot insert
duplicate key in object 'Student'."
 ?<Root xmlns:ns00="urn:schemas-microsoft-com:xml-
updategram"><?MSSQLError HResult="0x80040e2f"
Source="Microsoft OLE DB Provider for SQL Server"
Description="Violation of PRIMARY KEY
constraint 'PK_Student'. Cannot insert duplicate key in
object 'Student'."?></Root>".
///////////////////////////////////////////////////////
-----------------Warning 2-------------------------
The adapter failed to transmit message going to send
port "SQL://IMRAN-RAMZAN/VirginArtistLookup/". It will be
retransmitted after the retry interval specified for this
Send Port. Details:"Unknown Error Description ".
////////////////////////////////////////////////////////

I already catch DeliveryFailureException. But this exveption if fired when i try all number of tries. So that time I cant get any more detail information about that exception like warning message above. How to catch exception when there are warnign message like above.
Thanks so much..



Relevant Pages

  • Violation of primary key
    ... Violation of PRIMARY KEY constraint 'PK_CUSTOM2'. ... duplicate key in object 'MHGROUP.Custom2' ...
    (comp.databases.ms-sqlserver)
  • Re: MFC/ODBC/ACCESS Creating a New DataRecord in a table with primary key
    ... The error message is quite informative - it is telling you that you have ... > I have a table with an auto number field as primary key. ... > eate duplicate values in the index, primary key, or relationship. ... > Is there any possibility to get the new key from the database instead of ...
    (microsoft.public.vc.mfc)
  • Re: Need unique constraint on data table
    ... >click on the table and select design table and then right click on the design ... Like a PRIMARY KEY constraint, a UNIQUE constraint may span several ... Enterprise Manager is a great tool for administrating the database (doing ...
    (microsoft.public.sqlserver.setup)
  • Re: Completed subform Question
    ... the error message is not telling you the record already exists. ... and that is violating a primary key or unique-index rule. ... started this morning at 8:13 am, titled "Subform control", and read the ... >>date to the parent table, ...
    (microsoft.public.access.forms)
  • Re: removing last chrs (with different browsers giving different last chrs )
    ... I normally stick to regexp even if is_numericor type casting would also suffice, since the regexp engine is needed anyway, and I've set up a collection of frequently needed expressions as class constants. ... could very well be a primary key. ... In this case foreign key integrity would be violated (after all we are using a "real" relational database engine, ... A detailled error message is precisely the wrong thing in this case - it won't help the user, the developer has his or her own sources, but the evil bot will feast on that. ...
    (comp.lang.php)