Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Step 7 - Testing the Orders Business Object
Message
De
02/07/2007 02:48:22
 
 
À
01/07/2007 18:32:37
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01237054
Message ID:
01237079
Vues:
14
Hi Walter,
You are right! The problem was in wrong CommandType. Of course, I have not miss Step3 and add CommandType.StoredProcedure to public ABusinessObject()
but when Orders business object was generated by wizard, Constructor was overwritten with CommandType.Text

Thank you for your help!
Denis.


>> Additional information: Incorrect syntax near 'OrdersSelectByPK' but when I select this procedure in the VS Server Explorer - I can execute this stored procedure without problem.
>> How can I find the problem?
>
>Look in your business object's properties for DefaultCommandType - I'd guess this is set to CommandType.Text (or not specified) and changing it to CommandType.StoredProcedure would fix your problem. The jump start mentions this on Step 3, "Add code to the constructor that sets the DefaultCommandType property to CommandType.StoredProcedure..."
>
>You get the exact same error if you run something like this in Query Analyzer:
>
>declare @dummy int;
>OrderSelect
>
>The dummy line is just to stop QA from being clever.
>
>I've got caught by this sort of thing myself, and seen several posts on UT around this topic recently, eg Thread #1235787
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform