Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I see the parameters as I passed them to SP?
Message
From
27/05/2008 16:40:09
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01319767
Message ID:
01319801
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm passing parameters to SP and using InsertCommand for SQLDataSource. The error coming from the SP tells me that one of the parameters is NULL, but it should not be NULL, I believe.
>
>Do you know how can I get parameters (and in which method) how they were passed to SP?
>
>Thanks a lot in advance.

Hi Naomi,

you can use the "Inserting" event of the SQLDatasource object, to check or manipulate its InsertParameters collection. This event fires right before the data will be inserted.

For example:

protected void SqlDataSource1_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
if(this.SqlDataSource1.InsertParameters[0]==null)
{
// stop the insert process
e.Cancel = true;
}
}
Holger Vorberg
Germany
Previous
Reply
Map
View

Click here to load this message in the networking platform