By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Try....which is faster?

daniel aristidou
100+
P: 491
Hi guys......
I'm Printing and ...i want to know which code will process faster....

Expand|Select|Wrap|Line Numbers
  1. Try
  2. Column1 = Datagrid.rows(i).cell(0).value
  3. Column2 = Datagrid.rows(i).cell(1).value
  4. Catch ex as exception
  5. Try
  6. Column1 = Datagrid.rows(i).cell(0).value
  7. catch ex1 as exception
  8. column1 = "Error"
  9. End try
  10. Try 
  11. Column2 = Datagrid.rows(i).cell(1).value
  12. Catch ex2 as exception
  13. column1 = "Error"
  14. End try
  15. End try
Or this

Expand|Select|Wrap|Line Numbers
  1. Try
  2. Column1 = Datagrid.rows(i).cell(0).value
  3. catch ex1 as exception
  4. column1 = "Error"
  5. End try
  6. Try 
  7. Column2 = Datagrid.rows(i).cell(1).value
  8. Catch ex2 as exception
  9. column1 = "Error"
  10. End try
Feb 2 '08 #1
Share this Question
Share on Google+
2 Replies


VACEPROGRAMER
100+
P: 168
I think the second is fater. But way you need to be fast.
PS: What kind of program do you have , to print somethink or . . .

*VACE*
Feb 2 '08 #2

daniel aristidou
100+
P: 491
PS: What kind of program do you have , to print somethink or . . .
The program prints....customer records ...there is probably only about 1k of records....and most dont make errors.....
Feb 2 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.