Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Parameters - Correctly
Message
 
 
À
15/01/2013 15:59:06
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01562820
Message ID:
01562822
Vues:
30
>I promise, last question....
>
>for today
>
>I've got a Store Procedure that wants parameters @Subbank, @SCN, and @TCN. I'm trying to pass said parameters from VB.
>
>So far, I haven't found anything VB likes yet.
>
>I've tried
>
>.Parameters.Add(Subbank)     && It doesn't like this
>
>.Parameters.Add("Subbank")  && doesn't like this - wants object, not string
>
>.Parameters.Add(@Subbank)  && doesn't like this - Expression expected
>
>
>All three of these examples have come up in various results of Google-fu.
>
>What is the correct way?

This seems to show good samples

http://www.macronimous.com/resources/calling_stored_procedures_from_ASP.NET_and_VB.NET.asp

I also like this link
http://www.mikesdotnetting.com/Article/54/Getting-the-identity-of-the-most-recently-added-record

but scroll down a bit - don't use AddWithValue.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform