Error in creating Datasource in Coldfusion 11

Coldfuion 11 64bit versionDatasource creationHi,
 
I successfully installed Coldfusion 11 64bit version on Windows 2012 R2 server.
I was trying to add a datasource for my  Microsoft 2003 Accesss database "bagorder.mdb", but I get an error message "Unable to update the NT registry. Variable DRIVERPATH is undefined in Coldfusion".
Based on my brief research, I may have to install Coldfusion 11 32bit version instead.
(1) Is that the case?
(2) What is the purpose of "Use Default User name" is for? it was checked by default. I did not see this option in CF v7.

Thanks.
LVL 1
sgleeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gurpreet Singh RandhawaCEOCommented:
afaik, cf with 64 but has some serious bugs with Access database you should give a try with 32 bit version
sgleeAuthor Commented:
ok. I will re-install it with 32bit version.
sgleeAuthor Commented:
CF 11 in Add/Remove ProgramApps on Windows 2012R2After installing CF 32bit version, I can't seem to find the main icon neither on the desktop or under the Apps.
Where can I find the main icon?
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

_agx_Commented:
EDIT:  Sorry, went to post this before you installed 32bit version:

Regarding CF11 64bit, this post mentions a similar bug in CF10.  For .mdb files, they suggest you ignore the error and create the DSN anyway.  Then:


Steps 1 - 4 (Create Access DSN as usual)

5. Ignore the red text at top which says "Unable to update the NT registry. Variable DRIVERPATH is undefined."

6. Run C:\Windows\SYSWOW64\odbcad32.exe. Be sure to select the "System DSN" tab. Click "Add".

7. Choose this driver if it exists: "Microsoft Access Driver (*.mdb, *.accdb)". Otherwise, choose "Microsoft Access Driver (*.mdb)". Click "Finish".

8. Use same Data Source Name as in Step 3. ie "bagorder"

9. Click "Select" and browse to same .mdb (or .accdb) as in Step 4. Click "OK". Click "OK" again.

10. Run <cfquery datasource="MyAccessDSN" and wahlah!

Disclaimer: I don't use Access and am not running ODBC services

Also, check the bug database. There's several write ups about issues with Access:

https://bugbase.adobe.com/index.cfm?event=bug&id=3492620

https://bugbase.adobe.com/index.cfm?event=bug&id=3759846

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
_agx_Commented:
(2) What is the purpose of "Use Default User name" is for? it was checked by default. I did not see this option in CF v7.

Haven't used Access in years, but IIRC the mdb files used to default  to username "admin" and no password ie "" . Guess they decided to simplify things.  So if you never changed the default username/password you can just check the "Use Default User name" box instead of entering username = "admin" and password = empty string
sgleeAuthor Commented:
@agx
Thanks for the information. I will remove 32bit and reinstall 64bit. Maybe I will have my CF icon back.
I will report back.
sgleeAuthor Commented:
Mail Settings@agx
I am not sure if I am following your explanation regarding "Use default user name" checkbox.
For some reason, it populates the email account that I entered in CF admin Mail Server Settings section for some reason.
The email account is being used to send Order Confirmation Emails once the user submits an order online.
BTW There is no password for any of my ACCESS databases.
Can  you tell me what to do again? Do I leave it unchecked or checked?
If I check that checkbox, what do I enter into  ColdFusion user name and password fields?
sgleeAuthor Commented:
@agx
The steps provided in ID: 41098969 worked for me!
ODBC
When opened ODBC window, "bagorder" DSN name was there and I assume CF created that one.
Then I added a new DSN "BagOrder", so there are two DSN names with the same name.

it is stragnge ... I just checked ODBC in my CF v7 web server and I don't see any DSN names associated with CF/ACCESS database under System DSN. I am curious why CF v7 does not have anything and CF v11 creates one when I create a datasource and I have to create another one manually??
_agx_Commented:
(Edit - Consolidate responses to all questions)

Great to hear it worked!

>> For some reason, it populates the email account that I entered in CF admin Mail Server Settings section
Are you sure? AFAIK, the 2 are totally unrelated, so something like that would be a really big bug on CF's part.

>> There is no password for any of my ACCESS databases.
Then leave  the "Use default user name" box checked (do not enter a username or password). That tells CF there's no special credentials on the database. CF will just use the defaults instead.

I am curious why CF v7 does not have anything and CF v11 creates one when I create a datasource and I have to create another one manually??

Honestly, I don't remember how CF7 behaves, but the blog entry suggests CF is supposed to create an ODBC DSN for you automatically.  (You shouldn't have to create one manually. ) However, it doesn't under CF11 64bit because that version doesn't fully support Access.  That's why you have to perform the extra step.

The blog explains that when you create an Access DSN through the CF Admin, the CF server adds some keys to the windows registry. That's what creates the ODBC DSN.  Unfortunately, CF11 64bit creates the wrong registry keys.  It creates entries for a 64bit DSN.  Problem is the "ODBC Agent and Server (SequeLink) run as a 32-bit. process", so they're looking for a 32bit DSN.  Since the registry entries for a 32bit DSN are different, it's not found and that's why you get the "Unable to update the NT registry....".

64bit Registry Entry (Wrong keys generated by CF):
- key: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\{Data Source Name here}
- value: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\{Data Source Name here}

Open in new window



32bit Registry Entry (Correct keys added by manual ODBC DSN):
- key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\{Data Source Name here}
- value: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources\{Data Source Name here}

Open in new window


The blog suggests you can actually delete the extra DSN created by CF. ie The one that says Platform = N/A.  I'm curious if that works.


... To illustrate, just perform these 4 additional steps:

11. Delete the 64-bit DSN entries from the registry (after creating a registry backup):

    - key: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\{Data Source Name here}

    - value: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\{Data Source Name here}

12. Run <cfquery datasource="MyAccessDSN" and wahlah!

13. CF Admin > Data Sources

14. Click the Verify checkmark icon for the same data source. See Status is "OK"!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.