Syntax Tactics

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

a quick question. i am using vb.net to connect to a MS Access 2000 db. the problem occurs when the query has a syntax error. i get an unhandled exception, even when i have encapsulated all commands in try / catch blocks

is this type of error handling only available with SQL server (Catch ex as SqlException

Thanks in advance
Kunke
 
the problem occurs when the query has a syntax error.

Probably the easiest way to avoid this is to get Access to generate the SQL
in the query designer, and then copy/ paste the text into whatever you are
generating. Correct SQL really shouldn't generate runtime errors -- it's
only because VB etc does not provide the tools to check it at compile time.

B Wishes


Tim F
 
tim

well, i am not so much worried about the syntax issues. what does concern me is the fact that some time down the road (after deployment) access will thow some other type of exception that cannot be handled in a convenient / convential way

dan
 
well, i am not so much worried about the syntax issues. what does concern me
is the fact that some time down the road (after deployment) access will thow
some other type of exception that cannot be handled in a convenient / convential
way.

Access has nothing to do with your problems. You must be using either DAO or
ADODB (or other appropriate data access technology) to access the data and this
is where you need to address your issues. You might have better luck posting
your inquiry in a vb.database newsgroup.
 
your inquiry in a vb.database newsgroup.

No! You need a .NET group. There is no .NET database group,
so it will have to be .net.languages.vb.

I don't know why you can't catch exceptions from your
COM object, but those are the people to ask.

vb.database won't know anything about catching COM exceptions
in .NET, and won't thank you for being asked.

(david)
 
your inquiry in a vb.database newsgroup.
No! You need a .NET group. There is no .NET database group,
so it will have to be .net.languages.vb.

Aha! I was looking for that and it's "microsoft.public.dotnet.languages.vb".

Thanks, David.

:-)
 
Back
Top