Two Select Statements in an ActiveX DTS script

Hi Experts,

I use the following code in an activeX script following a select statement

          if rs.bof or rs.eof then noOrders = true
          if noOrders then
          Main = DTSTaskExecResult_Success
          End if
          if not noOrders then.... etc

My problem is that I'd like to add in another select statement further down the script and i don't want to have the message that it's been a success if the first query returns has an eof/bof....

Anyone think of a way around it?

Many Thanks
pjordannaAsked:
Who is Participating?
 
Jay ToopsCommented:
Just take the IF noOrders then .. end if out
 
         if rs.bof or rs.eof then noOrders = true
         if not noOrders then.... etc

You can check your noOrders value at any time to set the return value
          if noOrders then
          Main = DTSTaskExecResult_Success
          End if

JAY
0
 
Jay ToopsCommented:
I not sure I understand exactly what your asking...
could u clarify.?

JAY
0
 
pjordannaAuthor Commented:
thanks Jay yes - if i get an eof on the first select I want it to skip to the next select statement rather than returning a DTSTaskExecResult_Success
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Jay ToopsCommented:
Then this is just what you want??? <Smile>

let me know if you have any problems

JAY
0
 
pjordannaAuthor Commented:
you're right of course Jay - my code is breaking else where but i'll post another question for that - thanks for your help - have a good weekend!
0
 
Jay ToopsCommented:
you too!
JAY ..

PS.. thanks THAT grade just got me my MASTER level certificate... !!!!
http://www.experts-exchange.com/M_3415762.html

ALRIGHT!!!


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.