c# - Insert and select within same sp? -


here came situation want insert records in temp temple , again want dispaly record user.

i have created 1 sp in sp created temp table, added record table , select record temp table.how show record user in interface?

executenonquery used inserting record , executereader is used selecting record.

withing same sp,i have insert , select.so how in code behind?

you should use executereader.

all - sends string of commandtext server, executes it, , builds sqldatareader read from.

so if commandtext is call stored procedure - procedure executed (so insert data , select back) , returned data available in sqldatareader.

see msdn reference executereader


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -