Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF Hibernate ORM and MS Access

Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

I know, I know, MS Access.  But this task is the first step to start a process to eliminate a large number of heritage Access applications.

I am trying to use the CF9 Hibernate feature for the first time.  Should I expect it to work with an Access database?  The documentation seems to hint that is should, but I am getting a "Table Not Found" error that I can not understand.

I have a fifteen year old Access database, configured in ColdFusion on my workstation.  The DSN tests OK with the basic MS Access driver.  Using the MS Access Unicode driver throws an Jet Driver error.

I can run a basic query with <cfquery...> and retreive a simple table from this database.

This works:

    <cfquery name="prefixes">
        SELECT *
        FROM PREFIXES
    </cfquery>
    <cfdump var="#prefixes#">

I try to set this up with ORM as follows:

Applicaiton.cfc

<cfcomponent>
    <cfscript>
        this.name = "eval_scientists";
        this.datasource = "eval_scientists";
        this.ormenabled = true;
        this.ormsettings = {
                dialect = "MicrosoftSQLServer",
                logsql = true
            };
    </cfscript>
</cfcomponent>

prefixes.cfc

<cfcomponent persistent="true" table="PREFIXES">
    <cfproperty name="id" column="PREFIX">
    <cfproperty name="description" coluumn="DESCRIP">
</cfcomponent>

test code

    <script>
        prefixes = EntityLoad("prefixes");
    </script>
     <cfdump var="#prefixes#">

Running this version produces this error:

Table PREFIXES defined for cfc eval-scientists-orm.cfc.prefixes does not exist.

Is there any hope for me?  Or am I just out of luck with this combination of technologies?

TOPICS
Database access
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

Should I expect it to work with an Access

database? 

I honestly have not a clue But I can at least confirm your test code worked for me.

MS Access 2000 database (oldest I could find)

CF 9.0.1

Driver: MS Access Unicode

coluumn="DESCRIP">

I assumed "coluumn" was just a typo

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

-==cfSearching==- wrote:

I assumed "coluumn" was just a typo

Yes it was a typo I discovered and corrected after I posted my original question.  My IDE does not grok CF9 syntax, so I am on my own for typing new CF9 tags and properties.  Fixing it made no change to the error.

-==cfSearching==- wrote:


MS Access 2000 database (oldest I could find)

CF 9.0.1

Driver: MS Access Unicode

Interesting that yours works with MS Access w/ Unicode against an Access 2000 database.

This is a very old database, possibly created as far back as version Access 97, nobody knows anymore.  I have it installed on my workstation which is currently using Access 2010.  I can open and work with the mdb file in 2010.

When I set up the DSN in ColdFusion the MS Access Unicode driver DOES NOT work for me. I get this error.

Connection verification failed for data source: eval_scientists_unicode
                         com.inzoom.adojni.ComException: Unspecified error
                         The root cause was that: com.inzoom.adojni.ComException: Unspecified error in Microsoft JET Database Engine code=0 Type=1

The DSN works with the non-Unicode MS Access driver on my workstation.  Could this be a factor?  Does the Hibernate functionality need the Unicode driver?  If so, why would the MS Access 2000 database use the Unicode driver, but not the 2010?

Is it an issue that I have three versions of Access on my workstation?  I tried opening the mdb file with the Access 97 and Access 2003 that I have, neither could open it.  I presume that my Access 2010 has made the mdb file it's own since I have opened the file with that version and poked around.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

The DSN works with the non-Unicode MS Access driver on my

workstation.  Could this be a factor?  Does the Hibernate

functionality need the Unicode driver? 

From what I have read, it expects a well behaved jdbc driver which is tough with Access.

I presume that my Access 2010 has made the mdb file it's own

since I have opened the file with that version and poked

around.

That might be the problem. I have never even tried an Access 2010 database with the unicode driver. I am not sure it can read that format. If you have Access 2003 installed, how about creating a new database in that format. See if there is any difference.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

-==cfSearching==- wrote:

That might be the problem. I have never even tried an Access 2010 database with the unicode driver. I am not sure it can read that format. If you have Access 2003 installed, how about creating a new database in that format.  See if there is any difference.

Ok, so I just installed the old Northwinds sample database in my Access 2000/2003.  (It is in my Office 2003 folder, but the Help/About Access says it is Access 2000).  I then tried to create an DSN using the MS Access w/ Unicode driver.  I got the same error as my other database.

This is beginning to look like something is hokey with my Access w/ unicode driver!

I also noticed sincie my last posting that I only have CF 9.0.0 installed on my workstation.  So ok I thought, just download and install the updater.

But I can't!

Firefox will not download the installer.  First try says "cancled by macromedia".  If I restart the download in the downloader, it goes through the motion, but the instant it is done the file disappears from the download folder.  So I tried, Chrome, it will download the file and it does not disappear.  But when I try to run the installer I get a message about not having permissions to run the file.  Rather odd since I am a full administrator on this box.  So I tired IE8, it tells me as soon as I click on the download link that I do not have permissions.

This is getting to be very frustrating.  It is looking like I was not meant to try out any new functionality today!

I am also getting ---><--- this close to wipping this work station clean and reinstalling everything.  It is developing an ever growing list of really weird quirks and errors that I just can not explain or understand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

I am also getting ---><--- this close to wipping this work station clean and reinstalling everything.  It is developing an ever growing list of really weird quirks and errors that I just can not explain or understand.

I hear you on that. I have one old computer that has everything under the sun installed on it and it is quirky as all get out.  What is your o/s?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011

This box is a very venerable HP XP workstation.

I was on a Win7 machine for about a year, until I moved to a new position and the Win7 machine had to stay at the old position, as it had all the tools and configurations needed for that job.  So I just brought over an older workstation that was still sitting in my cubicle after a year.  At least it had most of my software and tools on it, so I wouldn't have to start with a blank slate.  But it has started to do *weird* things.  Thunderbird, Firefox, Dreamweaver, an ever growing list of tools just don't quite work right.  Seldom do they stop working or throw errors, they just do weird things.

I don't know if it is just me or not (but I can't find any real discussion about this from Internet searches), if I have a Google product running (i.e. Google Earth or Google Sketchup) then Firefox web pages will go black! The pages flashes on and off while scrolling so if you stop scrolling at just the right point you can see the page.  This is just weird to me.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 28, 2011 Jul 28, 2011
LATEST

Yeah my old machine is XP too. No vmware or anything like that. So it has gotten a bit quirkier in its old age. But I imagine a lot of that is due to installing program upon program, and often different versions of the same thing, like multiple versions of CF or .NET. Sooner or later something is bound to give. But the issues with you are desribing with Google products are downright weird. Maybe Google is to blame 😉 Seriously though if FF is the only one freaking out that way, it could be a mozilla problem. (I am definitely far less enamoured with FF than I used to be ...)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources