ANN: Generic ADO.NET 2.0 source code released on SourceForge

  • Thread starter Thread starter Michael Lang
  • Start date Start date
M

Michael Lang

The new release of Generic ADO.NET is ready (2.0). You can find this project
on sourceForge at:

http://sourceforge.net/projects/genadonet/

This version has gone as far as creating a new data provider with the prefix
"Gen". It contains classes "GenConnection", "GenDataAdapter" and so forth as
other providers contain. It is very similar to how you would use any data
provider, but the same code works for any code provider (Sql, OleDB, Odbc at
least). The exception is that you must also pass a "DbContext" (or another
'Gen' object) into the constructors. The DbContext is what defines the
underlying data provider. An instance of that provider is used underneath,
so you don't lose the performance gain of the individual provider. The
advantage is one codebase for working with every database.

Let me know what you think! If you are near St. Louis, consider coming to my
presentation at the C#.NET Sig User group meeting on September 8, 2003
(6:30pm) at the Microsoft Midwest offices. I will cover both of these open
source projects in detail.

Three City Place Drive Suite 1100
Creve Couer, MO 63141
(can see building from Olive Blvd and I-270, "Microsoft" in big letters)
 
Hi Michael

I downloaded your project and it looks really good. Is it something I could
use to dynamically generate command objects for a dataadapter? Or does it
rely on hardcoding the CRUD strings?

Thanks

Sam
 
That is one of the items I've put on my "Feature requests" list (can see on
the site). If you would like to help develop that feature, I would be hapy
to add you to the development team! If you have additional requests, you
can post them on the project site as well. If you would like to be notified
when a particular feature is complete, you can "monitor" that item (be
emailed when it is complete). The sourceforge site has a feature to let you
track any project release, request, or bugs.

requested item summary:
"SQL is not identical from engine to engine. Complex
constructs such as joins are handled differently between
engines.
Therefore each DbTemplate should contain a series of
classes/methods that build commands. The generic
code should then call these methods instead of hard
coding the strings."

https://sourceforge.net/tracker/index.php?func=detail&aid=794751&group_id=87262&atid=582539

Is this what you were asking? If not, give me an example.
 
I think so. See my posts under "Concurrency violation: Problem dynamically
creating DataAdapter commands" above.

I was trying to create a function that would automatically build the CRUD
command strings based on the column data returned from OleDbGetSchemaTable.
I couldn't use the command builder because Excel datasources don't return
PrimaryKey information.

Anyway, I've now written the function and it works. If it's of any use to
your project, I'll post it here.

thanks

sam
 
I think so. See my posts under "Concurrency violation: Problem
dynamically creating DataAdapter commands" above.

I was trying to create a function that would automatically build the
CRUD command strings based on the column data returned from
OleDbGetSchemaTable. I couldn't use the command builder because Excel
datasources don't return PrimaryKey information.

Anyway, I've now written the function and it works. If it's of any use
to your project, I'll post it here.

thanks

sam

In the DbOdbcTemplate class of the 'Gen" provider the"@FieldName"
parameters are automatically replaced as "?". I just noticed I forgot to
do that for the DbOleDbTemplate class. Sorry if that caused you trouble.

If you feel you have something in addition to contribute please post it
on the project site (http://sourceforge.net/projects/genadonet) in either
the "developer" forum. Please supply a description of what problem the
code solves, and where you suggest placing it. If the modification is
already adapted to the project then all the better! Then I'll release it
as soon as I test it. You'll be given credit at the appropriate places
in the project files and on the site.
 
Back
Top