473,379 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Dealing with System.Data.OleDB library wrapper...


Hello Newsgroup,

Started a job where an Access 2003 database is accessed with a custom
assembly that wraps\encapsulates the relevant System.Data.OleDb classes
needed for the application. Briefly structured as such;

MS Access 2003 Database <-> Jet40DataAccess (the custom OleDB wrapper
mentioned) <-> Business Logic <-> User Interface.

Jet40DataAccess basically contains (all wrapped up as) & all relevant
members are wrapped in the classes,
OleDbConnection (Jet40Connection)
OleDbCommand (Jet40Command)
OleDbParameterCollection (Jet40ParamterCollection)
OleDbDataReader. (Jet40Reader)

Hence Jet40DataAccess only needs referencing in the business logic part and
does not need to reference System.Data & System.Data.OleDb classes. I want
to include the OleDbParameter class wrapped up as Jet40Parameter, which is
no problem. I can fit it into the assembly pass it to
Jet40ParamterCollection as OleDbParameter fits into
OleDbParameterCollection, but for all obvious reasons I cannot construct a
for each loop to enumerate through parameters that works. Such as;

foreach (Jet40Parameter j40param in j40params) {//j40param stuff.}

for (int i = 0; i < j40params.Count; i++) {j40param = j40params[i];
//j40param stuff}
works.

Question, what can I do (if it's possible) to get Jet40ParamterCollection to
be an actual collection of Jet40Parameter and Jet40ParamterCollection is a
legitimate parameter collection of Jet40Command? Everything works except the
foreach loop, not essential but I wouldn't mind getting it to work like the
original classes it wraps. Thanks Newsgroup.

Regards,
SpotNet.

Oh yes, MS Access 2003 and VS .NET 2003-C#.
Nov 17 '05 #1
2 1671
You may find the following KB article useful.

http://support.microsoft.com/default...b;en-us;322022

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"SpotNet" <Sp*****@msnews.grp> wrote in message
news:eN**************@TK2MSFTNGP10.phx.gbl...

Hello Newsgroup,

Started a job where an Access 2003 database is accessed with a custom
assembly that wraps\encapsulates the relevant System.Data.OleDb classes
needed for the application. Briefly structured as such;

MS Access 2003 Database <-> Jet40DataAccess (the custom OleDB wrapper
mentioned) <-> Business Logic <-> User Interface.

Jet40DataAccess basically contains (all wrapped up as) & all relevant
members are wrapped in the classes,
OleDbConnection (Jet40Connection)
OleDbCommand (Jet40Command)
OleDbParameterCollection (Jet40ParamterCollection)
OleDbDataReader. (Jet40Reader)

Hence Jet40DataAccess only needs referencing in the business logic part and
does not need to reference System.Data & System.Data.OleDb classes. I want
to include the OleDbParameter class wrapped up as Jet40Parameter, which is
no problem. I can fit it into the assembly pass it to
Jet40ParamterCollection as OleDbParameter fits into
OleDbParameterCollection, but for all obvious reasons I cannot construct a
for each loop to enumerate through parameters that works. Such as;

foreach (Jet40Parameter j40param in j40params) {//j40param stuff.}

for (int i = 0; i < j40params.Count; i++) {j40param = j40params[i];
//j40param stuff}
works.

Question, what can I do (if it's possible) to get Jet40ParamterCollection to
be an actual collection of Jet40Parameter and Jet40ParamterCollection is a
legitimate parameter collection of Jet40Command? Everything works except the
foreach loop, not essential but I wouldn't mind getting it to work like the
original classes it wraps. Thanks Newsgroup.

Regards,
SpotNet.

Oh yes, MS Access 2003 and VS .NET 2003-C#.

Nov 17 '05 #2
Hello David,

Thank you so much, how well it works. I've been busting (actually did bust)
my head over this. I've been trying all this time to use combinations of
CollectionBase and the interfaces behind OleDbParameterCollection and
OleDbParameter classes, what a tangent to go on. Hey David I did find that
article very useful, thanks alot.

Regards,
SpotNet.
"David Lloyd" <in**@LemingtonConsulting.com> wrote in message
news:gN******************@bignews1.bellsouth.net.. .
: You may find the following KB article useful.
:
: http://support.microsoft.com/default...b;en-us;322022
:
: --
: David Lloyd
: MCSD .NET
: http://LemingtonConsulting.com
:
: This response is supplied "as is" without any representations or
warranties.
:
:
: "SpotNet" <Sp*****@msnews.grp> wrote in message
: news:eN**************@TK2MSFTNGP10.phx.gbl...
:
: Hello Newsgroup,
:
: Started a job where an Access 2003 database is accessed with a custom
: assembly that wraps\encapsulates the relevant System.Data.OleDb classes
: needed for the application. Briefly structured as such;
:
: MS Access 2003 Database <-> Jet40DataAccess (the custom OleDB wrapper
: mentioned) <-> Business Logic <-> User Interface.
:
: Jet40DataAccess basically contains (all wrapped up as) & all relevant
: members are wrapped in the classes,
: OleDbConnection (Jet40Connection)
: OleDbCommand (Jet40Command)
: OleDbParameterCollection (Jet40ParamterCollection)
: OleDbDataReader. (Jet40Reader)
:
: Hence Jet40DataAccess only needs referencing in the business logic part
and
: does not need to reference System.Data & System.Data.OleDb classes. I want
: to include the OleDbParameter class wrapped up as Jet40Parameter, which is
: no problem. I can fit it into the assembly pass it to
: Jet40ParamterCollection as OleDbParameter fits into
: OleDbParameterCollection, but for all obvious reasons I cannot construct a
: for each loop to enumerate through parameters that works. Such as;
:
: foreach (Jet40Parameter j40param in j40params) {//j40param stuff.}
:
: for (int i = 0; i < j40params.Count; i++) {j40param = j40params[i];
: //j40param stuff}
: works.
:
: Question, what can I do (if it's possible) to get Jet40ParamterCollection
to
: be an actual collection of Jet40Parameter and Jet40ParamterCollection is a
: legitimate parameter collection of Jet40Command? Everything works except
the
: foreach loop, not essential but I wouldn't mind getting it to work like
the
: original classes it wraps. Thanks Newsgroup.
:
: Regards,
: SpotNet.
:
: Oh yes, MS Access 2003 and VS .NET 2003-C#.
:
:
:
Nov 17 '05 #3

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

Similar topics

1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
5
by: Stephen Cawood | last post by:
I'm trying to use a C++ .lib from C# (I tried the Interop group will no results). I have a working wrapper DLL (I can get back simple things like int), but I'm having issues dealing with an array...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.