473,545 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

oledbprovider vs odbc provider ???

Dear all,

Does any one have any idea why an sql statment with INNER
JOIN syntax is working well with odbcprovider but not with
Oledbprovider when accessing an access 2000 database?

here is the code I have used with oledbprovider which fails

Dim monodbc As New
OleDb.OleDbConn ection 'Odbc.OdbcConne ction
monodbc.Connect ionString = ("Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Data Source='D:\Nomo s Net
Suite\Runtime\C onfig\NetDBConf .mdb';Jet OLEDB:Engine
Type=5;Provider ='Microsoft.Jet .OLEDB.4.0';Jet OLEDB:System
database=;Jet OLEDB:SFP=False ;persist security
info=False;Exte nded Properties=;Mod e=Share Deny None;Jet
OLEDB:Encrypt Database=False; Jet OLEDB:Create System
Database=False; Jet OLEDB:Don't Copy Locale on
Compact=False;J et OLEDB:Compact Without Replica
Repair=False;Us er ID=Admin;Jet OLEDB:Global Bulk
Transactions=1" )

'"MaxBufferSize =2048;FIL=MS
Access;DSN=TRYM E;PageTimeout=5 ;UID=admin;DBQ= D:\Nomos Net
Suite\Runtime\C onfig\NetDBConf .mdb;DriverId=2 5"

monodbc.Open()
Dim momo As OleDb.OleDbData Adapter
momo = New OleDb.OleDbData Adapter
Dim sds As OleDb.OleDbComm and

sds = New OleDb.OleDbComm and(Query, monodbc)
momo.SelectComm and = sds
Return momo.SelectComm and.ExecuteRead er()

if I use exactly the same thing but with odbcprovider no
problem works ok.

regards
serge
Jul 21 '05 #1
6 2662
You have not posted the query text or the error message, but:

- The .NET Data Provider for OLE DB uses the Jet OLEDB Data Provider
- The .NET Data Provider for ODBC uses the Access ODBC Driver

The Access ODBC Driver and Jet OLEDB Data Provider are diferent components
that can parse differently the SQL statements (or to have its own bugs). A
known issue is that while the Access ODBC Driver accepts ODBC syntax (for
outer joins, for example), the Jet OLEDB Data Provider does not (other OLEDB
Providers accept ODBC syntax, though).

So, you could reduce your query text to a minimum and post it here for
examination of others...

Carlos Quintero

"serge calderara" <se************ *@maillefer.net > escribió en el mensaje
news:05******** *************** *****@phx.gbl.. .
Dear all,

Does any one have any idea why an sql statment with INNER
JOIN syntax is working well with odbcprovider but not with
Oledbprovider when accessing an access 2000 database?

here is the code I have used with oledbprovider which fails

Dim monodbc As New
OleDb.OleDbConn ection 'Odbc.OdbcConne ction
monodbc.Connect ionString = ("Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Data Source='D:\Nomo s Net
Suite\Runtime\C onfig\NetDBConf .mdb';Jet OLEDB:Engine
Type=5;Provider ='Microsoft.Jet .OLEDB.4.0';Jet OLEDB:System
database=;Jet OLEDB:SFP=False ;persist security
info=False;Exte nded Properties=;Mod e=Share Deny None;Jet
OLEDB:Encrypt Database=False; Jet OLEDB:Create System
Database=False; Jet OLEDB:Don't Copy Locale on
Compact=False;J et OLEDB:Compact Without Replica
Repair=False;Us er ID=Admin;Jet OLEDB:Global Bulk
Transactions=1" )

'"MaxBufferSize =2048;FIL=MS
Access;DSN=TRYM E;PageTimeout=5 ;UID=admin;DBQ= D:\Nomos Net
Suite\Runtime\C onfig\NetDBConf .mdb;DriverId=2 5"

monodbc.Open()
Dim momo As OleDb.OleDbData Adapter
momo = New OleDb.OleDbData Adapter
Dim sds As OleDb.OleDbComm and

sds = New OleDb.OleDbComm and(Query, monodbc)
momo.SelectComm and = sds
Return momo.SelectComm and.ExecuteRead er()

if I use exactly the same thing but with odbcprovider no
problem works ok.

regards
serge

Jul 21 '05 #2
here is the text queery I am using and that I forgot to join here:

SELECT USER_PARAM.*, LANGUAGE.NAME
FROM USER_PARAM INNER JOIN [LANGUAGE] ON USER_PARAM.LANG UAGE_ID =
LANGUAGE.ID;

thnaks for your comments
regards
serge

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3

We have made some more testing on passing SQL synthax with inner join
statement and the only way we make it work was to use an odbcprovider.
No way to make it work with oledbprovider.

Do u have any idea if it is a know issue as we use to call it "bug".

thanks for your reply
regards
Serge
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
I have tested it on my system and my results are:

1) If you use that query, it only works with the ODBC Driver. Using the
OLEDB Provider, it returns an error opening the recordset. This seems to be
your case.
2) If you use LANGUAGE2 as the name of the table instead of LANGUAGE, it
works fine with both providers.
3) If you use [LANGUAGE] in each occurrence of this word in the statement,
that is:

SELECT USER_PARAM.*, [LANGUAGE].NAME
FROM USER_PARAM INNER JOIN [LANGUAGE] ON USER_PARAM.LANG UAGE_ID =
[LANGUAGE].ID;

instead of your original statement (which misses 2 occurrences), it works
fine with both providers.

HTH,

Carlos Quintero

"calderara serge" <se************ *@maillefer.net > escribió en el mensaje
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
here is the text queery I am using and that I forgot to join here:

SELECT USER_PARAM.*, LANGUAGE.NAME
FROM USER_PARAM INNER JOIN [LANGUAGE] ON USER_PARAM.LANG UAGE_ID =
LANGUAGE.ID;

thnaks for your comments
regards
serge

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #5

Hello carlos,

thnaks so much it works ok now.
But I would like to clarify my mind.

Does it means that LANGUAGE is a reserved word somehow in .NEt and it
cannot be used as a table name?

Why if I just make a simple querry to LANGUAGE table only like SELECT *
FROM LANGUAGE it works ok?

thnaks for your answer
serge

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #6
On Fri, 31 Oct 2003 05:12:55 -0800, calderara serge <se************ *@maillefer.net > wrote:

¤
¤ Hello carlos,
¤
¤ thnaks so much it works ok now.
¤ But I would like to clarify my mind.
¤
¤ Does it means that LANGUAGE is a reserved word somehow in .NEt and it
¤ cannot be used as a table name?
¤
¤ Why if I just make a simple querry to LANGUAGE table only like SELECT *
¤ FROM LANGUAGE it works ok?

Language is a reserved word in both Jet and ODBC, but apparently is being ignored in your ODBC
example:

http://support.microsoft.com/default...b;en-us;321266
http://msdn.microsoft.com/library/de...dappcpr_17.asp

You can use Language as a table name but as Carlos indicated it must be enclosed within brackets for
every occurrence in the SQL statement. It's typically best not to use reserved words to avoid these
types of problems.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3108
by: David Lozzi | last post by:
This happens a lot to my databases. I store them at the root of my developing files, i.e. c:\My Projects\Proj1\database.mdb. Randomly, the security settings on this database will drop to the basic secutiry, myself and SYSTEM. I need IUSR on it so I can access it through my ASP pages... I get errors like this: Microsoft OLE DB Provider for...
11
3736
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET...
0
2030
by: MrPhil | last post by:
(SQL 2K SP3a on W2K. VFP 6 data lives on W2K. GIGABIT BACKBONE, gig cards on the data servers) I'm sure anyone who attempts to retrieve or alter FP/VFP data through a SQL link server will commiserate. I'm getting sick of restarting my instance after attempting a simple OPENQUERY statement on a VFP 6.0 DBC link server: select * from...
4
5640
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
0
1142
by: Duncan Winn | last post by:
I have written a 'very basic' .NET provider which parses SQL statements and (through COM) gets the results from my existing Borland C++ classes. However, I have existing (commercial) software that connect to ODBC drivers that can be configured for different databases. I would like the 'DatabaseExplorer' software to talk to my.NET provider to...
6
377
by: serge calderara | last post by:
Dear all, Does any one have any idea why an sql statment with INNER JOIN syntax is working well with odbcprovider but not with Oledbprovider when accessing an access 2000 database? here is the code I have used with oledbprovider which fails Dim monodbc As New OleDb.OleDbConnection 'Odbc.OdbcConnection
1
4737
by: Crazy Cat | last post by:
Hi, I created a linked server for MS SQL Server 2005 Express to an Oracle database using the OLE DB Provider for ODBC. My ODBC Source uses the Microsoft ODBC for Oracle driver. I'm using the OLE DB Provider for ODBC instead of the Oracle OLE DB providers because those don't handle Oracle's Numeric Data Type well. When I set this up...
2
9928
by: Crazy Cat | last post by:
Hi all, I am having trouble getting linked Oracle 9 server in MS SQL Server 2005 Express to work properly. My machine is running Windows XP. The Microsoft and Oracle OLE DB Providers have problems dealing with Oracle's Numeric Data Type, so I decided to use Microsoft's OLE DB for ODBC Provider and an Oracle ODBC source. When using the...
2
1490
by: ram_palavalasa | last post by:
Hi all, I have a assignment of vc++.net and sybase to populate data and generate reports which is the best one? is OLEDB more efficient than ODBC? i think OLEDB itself is a layer on the ODBC..then how it can be? Thanks, RAM
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.