Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On Error Resume Next
#1
Solved: 11 Years, 3 Months, 4 Weeks ago Question 
Hi,

I am calling an external action in two different scripts.Both scripts are using their seprate datatables.

In the external action at one point I am using a variable which value is coming from datatable.( Specific to Script)

So I have to use two different statement to get the value. Now while executing any of these script one statement will be corrent & one will be wrong. So I have to use "On Error Resume Next".

Code:
On Error  Resume Next  
                     intCheckType=     DataTable.Value("pCheckType","rSelectDrug [epCSubREFREQ]")
                     intCheckType=     DataTable.Value("pCheckType","rSel1Drug [epCSubREFREQ]")

I want to use "On Error Resume Next" only for these 2 lines not more than that.....

Please let me know how to do that.
Sad
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Ankur ,

Shall we change the design of your scirpt. In your main script define two different variables lets say database 1 and database 2 and in your external action check for the status of these two values or may be you can set a flag for any of these variables and let your external action query the specific database based on the flag value defined in the script.
So for script 1 database1 value will be true and for script 2 database2 value will be true and your external action will query those specific databases. I am not sure how flexible it can be in future to maintain it but just think of this soln.

Regards,
Balaji
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Balaji,

Thanks for reply...but it also has the same problem.As I have already explained that there are 2 scripts using common External Component(action),and each script has its specific database (Excel Sheet).

Code:
intCheckType=     DataTable.Value("pCheckType","rSelectDrug [epCSubREFREQ]")
intCheckType=     DataTable.Value("pCheckType","rSel1Drug [epCSubREFREQ]")

And this "CheckType" value is genrated & stored in the data table in the previous external action called by main script.

So there is no option to handle these variables into the main script.
SadSad
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
To turn error handling back off use:

Code:
On Error GoTo 0
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to raise an exception handling for an edit box without using On error resume next 1981.madhu@gmail.com 1 2,695 09-21-2009, 02:10 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)