Skip navigation

accdb with CF9 under Win2008 R2 64bit

Jan 27, 2012 8:50 AM

  Latest reply: drdagwood, Jul 27, 2012 6:30 PM
Replies 1 2 Previous Next
  • Currently Being Moderated
    Feb 8, 2012 12:21 PM   in reply to Didi

    Didi,

    Before I go JDBC, just one last stab with 64 bit, for the purpose of elimination. Set the DSN up in the Administrator, choosing "Microsoft Access" as driver.

     

    For the "Database File", browse to and select your (64 bit) ACCDB file. Next, click on "Show Advanced Settings". Enter the following as "Connection String":

     

    jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=absolute_path_to_accdb_file

     

    Click to "Submit" the changes. What is the result?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 9, 2012 12:34 AM   in reply to Didi

    Didi wrote:

     

    I tried

     

    • jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Z:\DATABASE\Didi\2010-64.accdb    OR
    • jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Z:\DATABASE\Didi\2010-64.accdb;   OR
    • jdbc:odbc:Driver=Microsoft Access Driver (*.mdb,*.accdb);DBQ=Z:\DATABASE\Didi\2010-64.accdb

     

    as well as

    • Database File = Z:\DATABASE\Didi\2010-64.accdb   AND/OR
    • System Database File = Z:\DATABASE\Didi\2010-64.accdb

     

    Same result:

     

    When registering:

     

    Unable to update the NT registry.

    Variable DRIVERPATH is undefined.

     

    When verifying:

     

    Connection verification failed for data source: movo2accdb

    java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application

    The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application

    Sufficient:

     

    • jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Z:\DATABASE\Didi\2010-64.accdb
    • Database File = Z:\DATABASE\Didi\2010-64.accdb

     

    Register. No need to verify. Now, run a ColdFusion CFM page containing the following code:

     

    <cfquery name="testQ" datasource="movo2accdb">

    select *

    from your_table_name

    </cfquery>

     

    <cfdump var="#testQ#">

     

    If this test succeeds, then your 64-bit installation will have worked. The error would have been caused by ColdFusion engaging the (my guess) 32-bit Macromedia driver and by the NT/DRIVERPATH issue which many consider a longstanding bug.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 13, 2012 1:38 AM   in reply to Didi

    OK. That was that then. Let's move on.

     

    I do believe our hopes now lie with JDBC. Since ColdFusion is a Java application, finding a 32-bit and 64-bit JDBC driver for MS Access will help many developers.

     

    My search brought me to HXTT's JDBC driver for MS Access. The only problem is, I couldn't tell whether their driver is for 32-bit or 64-bit Access. Could it (hopefully) be universal, automatically detecting the system? 

     

    (After the customary virus scan) I unpacked their access.zip file, copied the essential file Access_JDBC40.JAR from /access/lib/ to ColdFusion's lib directory. That's all there is to installing the driver. I then restarted ColdFusion.

     

    I went to the ColdFusion Administrator and configured a datasource as follows:

     

    Data Source Name: myAccessDSN

    Driver: Other

     

    JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb

    Driver Class: com.hxtt.sql.access.AccessDriver

    Driver Name: com.hxtt.sql.access.AccessDriver

     

    It worked flawlessly. But then again, though I installed everything you did, I am on 32-bit Access. 

     

     

    accessDSN.jpg

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 19, 2012 9:25 AM   in reply to Didi

    Thanks to you, too, Didi, for offering me this opportunity to learn.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 1:43 AM   in reply to Didi

    A recommendation to change the database is NOT regarded as helpful

     

    Dammit, that's me out then.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 3:10 AM   in reply to Didi

    Procedure 1:

    1. SELECT qry from CF9 to the  DS
    2. UPDATE something in DS from CF9
    3. UPDATE something else in the underlying table from within MS Access
    4. SELECT qry from CF9 to the  DS

     

    Procedure 2:

    1. SELECT qry from CF9 to the  DS
    2. UPDATE something in the underlying table from within MS Access
    3. UPDATE something else in DS from CF9
    4. SELECT qry from CF9 to the  DS

     

    Does these procedures work? That is, does step 4 reflect both changes made in steps 2 and 3?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 5:17 AM   in reply to BKBK

    >>JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb

    >But this procedure does not work

    >    SELECT qry from CF9 to the  DS

    >    UPDATE the underlying table from within MS Access

    >    SELECT qry from CF9 to the  DS (this does NOT reflect the change made in the step before)

    You need lockType=ACCESS connection property, then HXTT Access and MS Access can see each other.

    For instance,  JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb?lockType=ACCESS

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 5:26 AM   in reply to HXTT Support

    HXTT Support wrote:

     

    >>JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb

    >But this procedure does not work

    >    SELECT qry from CF9 to the  DS

    >    UPDATE the underlying table from within MS Access

    >    SELECT qry from CF9 to the  DS (this does NOT reflect the change made in the step before)

    You need lockType=ACCESS connection property, then HXTT Access and MS Access can see each other.

    For instance,  JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb?lockType=ACCESS

    Wow! HXTT Support! What a privilege!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 8:10 AM   in reply to Didi

    When you have one user and all the files are already cached, maybe

     

    Wait for a second user to hit your site, it'll be like a DDOS.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 5:24 PM   in reply to Didi

    >Well, Access_JDBC40.jar works fine for me, but I guess, 41 has some advantages?

    You cannot use Access_JDBC41.jar, since JDBC 41 API is for JDK1.7.X, and your ColdFusion is using JDK1.6.X. Both of Access_JDBC40.jar and Access_JDBC41.jar are released as v5.1 for different JDBC API standard.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2012 5:40 PM   in reply to Didi

    >   When you have one user and all the files are already cached, maybe

    First, according to one customer's random access( which needn't  cached for recycle) report for  big file on CD-R, HXTT Access engine is faster than MS Access ODBC engine.

    Secondly, on lockType=ACCESS mode, HXTT Access won't use cache, since MS Access and HXTT Access can't share cache for concurrent according to old MS Access lock mechanism. HXTT Access has a faster data format parser/loader, and can utilize existent index fully for most sql.

    Thirdly, only without lockType=ACCESS mode, HXTT Access can use multi-level cache, for physical file, object query reslut, session, transaction. All core is smaller, and HXTT Access can run on mobile platform.

    Forth, only with assigned delayecClose connection property, HXTT Access can choose to build temporary index for big table without existent index.

    According to performance test, HXTT drivers is faster than most of popular databases.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2012 4:20 AM   in reply to Didi

    >So, what configuration would you (HXTT Support, not you Owain ) recommend for a productive installation?

    It's only a jdbc url demo. You need only lockType=ACCESS since you need MS Access concurrent access. You can add other connection property if you need some special feature, for instance, ODBCTrimBehavior or caseInsensitive.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 12:22 PM   in reply to Didi

    Hi Didi,

     

    For MSAccess in 64-bit CF, you need the 32-bit drivers.

     

    Please follow these exact steps on the Win2008 R2 64bit CF9 machine:

    1) Install the 32-bit AccessDatabaseEngine.exe.  Note: If 64-bit AccessDatabaseEngine_x64.exe or any 64-bit MS Office Apps are already installed, then AccessDatabaseEngine.exe must be installed via the command line with the "/passive" argument (ex: AccessDatabaseEngine.exe /passive).

    2) Create DSN via CF Admin and ignore this error: "Unable to update the NT registry. Variable DRIVERPATH is undefined."

    3) Register a "System DSN" using same name as in Step 2, via 32-bit C:\Windows\SysWOW64\odbcad32.exe, and choose this driver: "Microsoft Access Driver (*.mdb, *.accdb)"

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 22, 2012 7:20 AM   in reply to itisdesign

    Aaron,

        I followed your instructions above however I don't see the MDB db driver (at least that's what I named it when I created it in the SysWOW64)  so how do I make the "MDB" driver show in my CF Administrator DSN dropdown?

     

     

    Connection verification failed for data source: MBD

    java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: Data source name not found and no default driver specified

    The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: Data source name not found and no default driver specified

     

    Thanks,

    Daren

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 22, 2012 4:57 PM   in reply to drdagwood

    Hi Daren,

     

    Step 2 was: 'Register a "System DSN"' (not "User DSN").  And that drop down on "CF Admin > Data sources" displays drivers, not data sources.  Here are the steps to correct the MSAccess/x64CF issue:

     

    1) Open C:\Windows\SysWOW64\odbcad32.exe

    2) Click the "User DSN" tab

    3) Select your data source (which you've named "MDB") and click "Remove"

    4) Click the "System DSN" tab

    5) Important: If your "MDB" data source exists here as well, then select it and click "Remove"

    6) While still on the "System DSN" tab, add the "MDB" data source

     

    Basically, your data source must be deleted from SysWOW64's odbcad32.exe on both the User DSN tab and the System DSN tab.  THEN, once it doesn't exist on either tab, it can be added on the System DSN tab.

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 27, 2012 6:30 PM   in reply to itisdesign

    Aaron,

        I'm still having an issue...apparently I'm not smarter than the equipment I'm using. Here's what I did:

     

    1. I opened the C:\Windows\SysWOW64\odbcad32.exe and removed my old DSN under the "User DSN" tab
    2. Opened hte "System DSN"
    3. DSN = MBD
    4. System Database I selected "Database“ and mapped it to my MBD.mdb database
    5. Opened CF Administrator
    6. Under "Ädd New Data Source" I typed MDB
    7. Under "Driver" selected "MS Access"
    8. Clicked "Add"
    9. In "Database File" I mapped to my MBD.mdb (still receive error) and received the following error: (Connection verification failed for data source: MBD
      java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][SequeLink Server]Unable to retrieve error message from backend ODBC Driver.
      The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][SequeLink Server]Unable to retrieve error message from backend ODBC Driver.)

     

    9a. In "System Database File" I mapped to my MBD.mdb (still receive error) and received the same error.

    When I go to my CF pages that pull data from the database I receive the following error: [Macromedia][SequeLink JDBC Driver][SequeLink Server]Unable to retrieve error message from backend ODBC Driver.

     

    Any idea what I’m doing wrong?

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points