multiple parameterized sql-statements in ado.net on SQL Server -


let me ado Using SqlCommand in the net, there is a problem in executing the two parameters in a batch. (I want to reduce round-treps and to avoid pinging)

Since I do not want performance planning pollution because I have ADO Net is expected to replace my command text with "STT1; STAT 2", STMT2 added to SQL Commands. Parameter

For:

  sp_executesql 'stmt1', 'paramdecl', param1values; Sp_executesql 'stmt2', 'paramdec2', param2values ​​ 

But I can not find any way to do this.

Neither I can get the full text which is being sent to SQL-server per SQL command so that I can add two of them myself.

How do I do this?

Regards,

Jens Nordenbro

Also expect returns value / set the results from Sql statements? Are the parameters of each statement different?

You can use the SQL Profiler to track the database's SQL statements.

You can use a single SQL Connection object and connection.

Adam

You must either resolve sql commodity or clear it before re-using it for your next query.

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -

asp.net mvc - Dynamically Generated Ajax.BeginForm -