Occasional SQL Error

  • Thread starter Thread starter scorpion53061
  • Start date Start date
Scorpion,
If the users (accounting department) are not able to show you (reproduce)
what is happening, so you can debug it yourself & see the variables.

I would put a try catch around that section of code, and write the sql2
variable, plus any other pertinent information (custno, opentype, sortterm,
Exception.ToString) to a text file or event log. In fact you could create a
custom Exception that includes all the pertinent information, then let your
normal exception logging handle it. Then when they say it happened, I would
check the text file or event log & say: Oh! Item x is wrong...

As the others have suggested. I would also look at parameterizing the SQL
statement rather then using string concatenation.

Hope this helps
Jay
 
Scorpion,
I'm not really seeing anything obvious in the code you posted.

Hope this helps
Jay
 
That was corrected code I did with Vaughn and Ryan pointing me in the right
direction. Ryan had not seen it yet so that is why I posted it.
 
Correction that is you of course as well.

:)

scorpion53061 said:
That was corrected code I did with Vaughn and Ryan pointing me in the right
direction. Ryan had not seen it yet so that is why I posted it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top