Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Step 7 - Testing the Orders Business Object
Message
De
01/07/2007 18:32:37
 
 
À
01/07/2007 14:42:22
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:
01237063
Vues:
24
> 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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform