Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a new record via OleDbCommand
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00693070
Message ID:
00693136
Vues:
23
>It is very strange. This should not fail unless there are some issues accessing SP using OLE DB provider. To prove this, can you just put
RETURN 9999
as the first line of NewId() SP?
>

Your question made me look closely at my test tables. I was assuming the NewID() function was causing the problems since I tested it on another table that didn't use it, and it worked just fine. In fact, it's the RI code that is causing the problem (surprise, surprise..."trigger failed" should have given me a clue ;-) ). It seems the RI code we use (which is based on the code from Steve Sawyer - the "Effective Techniques" book). It's using some commands that aren't supported in the OLE-DB provider. Specifically, RELEASE and SET ANSI. #DEFINE is also (supposedly) not supported, but that works inside of NewID(). As soon as I removed the Insert trigger, my .NET code worked.

Now, having done that, is there an easy way to get the new ID that was generated for this new record?
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform