Link to home
Create AccountLog in
ColdFusion Language

ColdFusion Language

--

Questions

--

Followers

Top Experts

Avatar of sglee
sglee

Error in creating Datasource in Coldfusion 11
User generated imageUser generated imageHi,
 
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.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Coast LineCoast Line🇨🇦

afaik, cf with 64 but has some serious bugs with Access database you should give a try with 32 bit version

Avatar of sgleesglee

ASKER

ok. I will re-install it with 32bit version.

Avatar of sgleesglee

ASKER

User generated imageUser generated imageAfter 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?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of _agx__agx_🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of _agx__agx_🇺🇸

(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

Avatar of sgleesglee

ASKER

@agx
Thanks for the information. I will remove 32bit and reinstall 64bit. Maybe I will have my CF icon back.
I will report back.

Avatar of sgleesglee

ASKER

User generated image@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?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of sgleesglee

ASKER

@agx
The steps provided in ID: 41098969 worked for me!
User generated image
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??

Avatar of _agx__agx_🇺🇸

(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"!
ColdFusion Language

ColdFusion Language

--

Questions

--

Followers

Top Experts

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.