Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / September 2005



Tip: Looking for answers? Try searching our database.

JET ODBC Driver vs. JET OLEDB Drvier

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
boaz - 28 Sep 2005 22:13 GMT
Hi,

Couple posts below, someone suggested that I should use the OLEDB driver for
JET instead of the ODBC driver becasue the ODBC driver for JET was buggy.

So, I changed the connection to use the OLEDB drvier for JET.  However, many
of my SQL did not work anymore.  Hours later, I finally realized that I
needed to add the bucket to all the fields like:

Select * From [table_1] Where [this_field] = this;

Instead of just:

Select * From table_1 Where this_field = this;

Once I added the bucket, everything seemed to work fine.

But I am confused!!!!
What the heck is the problem???!!!!

> There is no answer.
> There has not been an answer.
> There will not be an answer.
> That IS the answer!
> And I am screwed.
> Deadline was due yesterday.
>
> There is no point to life.
> THAT IS THE POINT.
> And we are screwed.
> We will run out of oil soon.
Al Reid - 28 Sep 2005 22:29 GMT
> Hi,
>
[quoted text clipped - 12 lines]
> But I am confused!!!!
> What the heck is the problem???!!!!

I don't use access as much these days, but if I remember correctly, you
should only need brackets if your identifiers are reserved words or have
spaces in them.  Can you give an example where you had to surround you
table/column names with brackets?

--
Al Reid
boaz - 28 Sep 2005 22:38 GMT
I don't remember what I changed.  I have been adding bucket to the sql all
day long.  <G!>
But I am sure the field is not reserved word.  Otherwise, it will pops up
error all over the place.

The thing is when it is passing to the ODBC driver, it has no problem
running the sql at all.
And the error coming back from the OLEDB driver (with the same sql) does not
make any sense at all.  (I don't remember what it is though)

>> Hi,
>>
[quoted text clipped - 20 lines]
> --
> Al Reid
Al Reid - 28 Sep 2005 23:06 GMT
>I don't remember what I changed.  I have been adding bucket to the sql all
>day long.  <G!>
> But I am sure the field is not reserved word.  Otherwise, it will pops up
> error all over the place.

I don't think so.  The reserved word I am referring to are things like year
or month that are part of your SQL string and as such are parsed by the
database engine.  Since they are encloised in quotes, VB soesn't see them.

> The thing is when it is passing to the ODBC driver, it has no problem
> running the sql at all.
> And the error coming back from the OLEDB driver (with the same sql) does
> not make any sense at all.  (I don't remember what it is though)

Without either the error or the offending SQL statement, I can only guess.

--
Al Reid
boaz - 28 Sep 2005 23:15 GMT
Yes, I am sure the field is not the "Access" or "VB" reserved word.
But it is all good now.  I almost finish putting bracket to all the sql
statements.

>>I don't remember what I changed.  I have been adding bucket to the sql all
>>day long.  <G!>
[quoted text clipped - 15 lines]
> --
> Al Reid
Al Reid - 28 Sep 2005 23:26 GMT
> Yes, I am sure the field is not the "Access" or "VB" reserved word.
> But it is all good now.  I almost finish putting bracket to all the sql
> statements.

I wish I could be so quick to dismiss the underlying issue and just change
things without knowing if or why it works.  I'd get a lot more sleep that
way. <g>

--
Al Reid
boaz - 29 Sep 2005 01:30 GMT
There is something new to learn everyday... ;) especially when you are in a
spiral with no end to it, you will just get over it as quickly as possible.
Mahahaa!!!!

P.S.
You do know what a Spiral is, don't you?
http://en.wikipedia.org/wiki/Spiral_model

>> Yes, I am sure the field is not the "Access" or "VB" reserved word.
>> But it is all good now.  I almost finish putting bracket to all the sql
[quoted text clipped - 6 lines]
> --
> Al Reid
Someone - 29 Sep 2005 00:59 GMT
What is the exact table name in Access? The default names that it uses are
like "Table 1", with a space in the middle. Maybe the ODBC driver is
treating underscore as a space replacement, I don't know. In any case, OLE
DB is a newer, Microsoft only standard to access databases, with ODBC being
the old method.

> Hi,
>
[quoted text clipped - 28 lines]
>> And we are screwed.
>> We will run out of oil soon.
boaz - 29 Sep 2005 01:25 GMT
This is not the case.  None of my table or field has space.  All of them use
underscore.
All my sql are well formatted.

BUT... It makes no different now.  I have added bracket to all the fields
and tables.  And the sql all work without any problem now.  So...  As some
dead chinese dude had said long time ago - It doesn't matter what color the
cat is.  As long as the cat can catch mouse, it is a good cat.

ODBC, OLEDB, Basic, Java, C, whatever... as long as it works it is a good
language.

oh... the sql below is just an example.

> What is the exact table name in Access? The default names that it uses are
> like "Table 1", with a space in the middle. Maybe the ODBC driver is
[quoted text clipped - 34 lines]
>>> And we are screwed.
>>> We will run out of oil soon.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.