Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about ExecuteNONQury

Status
Not open for further replies.

jpower69

Programmer
Feb 5, 2008
54
US
I know that I use executenonquery for inserting/updating fields/deleting rows from a table
My question is this..

I have the following sql statement
lsql_tmp = "select * into temp_item_" + wcode + " _" + strdate1 + " from [merg].[dbo].[item] where itm_pri_cd = '" + wcode + "' and bolevel > 0 "
where wcode is a ten character and strdate1 is defined as Dim strdate1 As String = Date.Today.ToString("yyyyMMdd")

what I am doing is backing up the data BEFORE i run my delete statement, just in case...

can I use executenonquery to execute the above sql statement?? or is there another .net command that
will execute this statement??

thanks in advance for any comments/suggestions
 

It should work just fine.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Thanks for the fast response...
I thought it would but was not sure


again thanks

 
Is that something you intend to use over and over again in an application? If so there are better ways to go about that.
 
well right it is in development. i'm building a maintenance function for a new/updated application that will be used y the users
when maintenance to an account has to be done by them

Eventually it might be used heavily, but not now

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top