Re: .NET database inspection API?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Sun, 27 Apr 2008 15:06:46 -0700, Arne Vajhøj <arne@xxxxxxxxxx> wrote:

[...]
True. And the way you would go about accomplishing this would very much be database dependent (unfortunately). The reason is that the meta data within each database (THIS is the stuff you are after) is stored differently for each database product, and even changes between versions for a given database (e.g., SQL Server).

That is how it is.

It is not how it needs to be.

The JDBC API provides a database independent way of doing it. There are
defined methods in the interfaces and the JDBC driver writers has to
implement that using whatever methods are appropriate for the database.

Hmmm...well, that's interesting. In my case, I don't actually _need_ general-purpose database support, at least not at the moment. It just seemed that the more generally the application could be written at the outset, the less likely there'd be some maintenance issue in the future, should the database format change.

I know the database format (Access .MDB files). And I don't _have_ to do this in .NET. Java would be okay, if that turned out to be a better general-purpose solution.

Rather than switch newsgroups, I'll just ask the basic question here: is there JDBC support for Access .MDB files? If so, is this support limited to a specific platform or platforms (e.g. Windows), or have the drivers been implemented wherever the Java run-time itself has been?

Cross-platform would be great. The specific application can be Windows only if that turns out to be the least-expensive way to write it, but the users would much prefer a cross-platform solution. If it's actually easier to do it cross-platform, via Java, then that's an obvious win. :)

The fact is, if push came to shove, there's no real need to be able to deal with an arbitrary database structure. At least for the moment, the actual database structure is known and of course we can always open the files in Access to find out the details of the structure if it should change in the future. It would be sufficient to simply allow the user to describe the database structure. But obviously it'd be easier for the user if the application can present the existing structure to the user instead.

I appreciate all the responses. The DbConnection.GetSchema() method sounds the most promising, at least from the .NET point of view. However, I'm intrigued by the possibility that Java might actually work better. That would be amusingly ironic. :)

Thanks!

Pete
.



Relevant Pages

  • Re: data structure suggestion (native python datatypes or sqlite; compound select)
    ... Well, that may be a part of the problem, the database structure is ... string this way - partly using string interpolation or sequence ... In general you'd have a fixed database structure and fixed queries. ... tagged texts to be the primary storage format, ...
    (comp.lang.python)
  • Re: Data-aware GUI controls
    ... > Independance of database vendor can easily be archived by using ANSI ... But it is a mistake to try to be indepandant of database type. ... > Independance to database structure is almost impossible to do in most ... Now consider an application that provides customer data to individual ...
    (comp.object)
  • Re: Invoice database / report question.
    ... Since this was both a database and report issue, ... that your responses get fragmented, i.e. it limits the way the responses ... database structure or the report. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: No knowledge of the database?
    ... I see that we agree that "the source code and the database structure ... Codd's original vision for RDB, and the vision of many of us ...
    (comp.object)
  • Re: No knowledge of the database?
    ... > When I look at different forums about object oriented programming I ... > database structure is absolutely necessary for every programmer (even ... Are there anybody here on this forum that develop ...
    (comp.object)