Link to home
Start Free TrialLog in
Avatar of henrym01
henrym01

asked on

Display and Insert SQL queryString, ASP.net

Hello Experts,

I have two statements and wish to only have one as when ran with two they counter act each other and the info is added to the table but not displayed:



Displays the info i want:  

queryString = "select * from tCart where OrderNbr = " + OrderNbHS;


Copies the info i want:    

queryString = "INSERT INTO [tOrderDetail] SELECT [pcode],[qty],[OrderNbr] FROM [tCart] WHERE OrderNbr = " + OrderNbHS;

Thank You!
ASKER CERTIFIED SOLUTION
Avatar of rajaloysious
rajaloysious

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rohanbairat3
rohanbairat3

i am not getting ur question...

In the above case ...u cannot have two statements combine...

but u can use the insert statement first and then select so u can get the inserted data displayed.

-Rons