Porting a data layer from SQL to OleDb/Access

  • Thread starter Thread starter Jeff 'Jones' Putz
  • Start date Start date
J

Jeff 'Jones' Putz

I'm quaking at the thought of doing this (it's against my will!), but
are there any significant "gotchas" porting a data layer from the
SqlClient to the OleDb classes for use with Access? I've got
straight-forward SQL for all of the commandtext, generally with
parameters for every query. Does Access speak the same language?
 
1: parameters are numberd, not named.
2: if you use [] as delimiter for field names, and misspell a field name,
OleDb will complain about a parameter not initialised.
3: the join syntax for ANSI joins is different - radically, so to say. Took
me half adozen saple someone wrote me to get it right.
4: GUID encoding is different.
5: as are dates.
6: Datetime parameters - are buggy. They dont accept a DateTime object, but
accept object.ToString () - seems like a formatting issue.

So, this is abot US english and Indian english, if you want it in languages.

Thank heaven I only have to step into this occasionally as all our SQL is
now auto-generated from an abstract form :-)

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 
Back
Top