Ask a Question related to Coldfusion Database Access, Design and Development.
-
jeramie72 #1
programmatically creating a cf5 dsn
Hello,
I was curious if there was a way to programmatically create a coldfusion dsn
for a ms sql 2000 database using coldfusion 5.0 code? i have been searching
the forum for a past posting on this subject and haven't found one but i do
appologize if i missed it. I would think i could using cfobject but i would be
very grateful for an example if possible.
thanks a lot,
Jeramie
jeramie72 Guest
-
Creating connection keys programmatically
Hi, Is there anyway I can create the connection keys programmatically, using an API or something ? Thanks in advance -
Creating and printing PDF files programmatically
Here are the requirements for my multi platform C++ app (windows, hp-ux and linux) wrt reporting: 1) produce PDF reports 2) store PDF reports in... -
programmatically add DSN
How can I access a db without first registering in CF Administrator datasources? Can I programmatically (like asp) create a datasource in the .cfm... -
Saving A PDF as a PNG Programmatically
I need to save PDFs as BMP files, scaled down in size. The closest thing I found was PDFtoIMG, but it crops the right edge and the bottom edge. I... -
Programmatically creating a datagrid control - Events NOT Firing!!!! Please Help
My Events are not firing. Viewstate is Enabled. My Datagrid's datasource is being set after the Page Load. Is that a problem? How can I make it... -
Mountain Lover #2
Re: programmatically creating a cf5 dsn
it's been a while since I tinkered with this code...and I'll dig a
little deeper if I get time. I think I have some code using cfhttp and
the cf admin. This might get you started...it uses cfregistry:
!--- add the datasource --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ ODBC Data Sources"
ENTRY="#data_source_name#" TYPE="String" VALUE="SQL Server">
<!--- add datasource key --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini"
ENTRY="#data_source_name#" TYPE="Key">
<!--- set the file name --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="Database" VALUE="#FORM.createDB#" TYPE="String">
<!--- set the description --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="Description" VALUE="" TYPE="String">
<!--- get the SQL Server Driver --->
<CFREGISTRY ACTION="GET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST. INI\SQL Server"
ENTRY="Driver" VARIABLE="gotDriver" TYPE="String">
<!--- set the driver --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="Driver" VALUE="#gotDriver#" TYPE="String">
<!--- set the server --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="Server" VALUE="(local)" TYPE="String">
<!--- set the trusted connection --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="Trusted_Connection" VALUE="Yes" TYPE="String">
<!--- set the last user --->
<CFREGISTRY ACTION="SET"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ #data_source_name#"
ENTRY="LastUser" VALUE="" TYPE="String">
HTH,
Tim
--
Tim Carley
[url]www.recfusion.com[/url]
[email]info@NOSPAMINGrecfusion.com[/email]
Mountain Lover Guest



Reply With Quote

