Thanks for the info, will have to experiment and see what happens

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 12:30 PM
To: CF-Talk
Subject: Re: DSNless connection


Sam Neff posted this a while back for me....haven't tested, but I'll betcha
it'll work:

Sam Neff said:

As earlier posters stated, DSN-less connections are no longer directly
supported in CFMX because they are not supported in JDBC.  However, there is
an easy work around.

Jet (MS Access database engine) supports a special use of the IN keyword in
the FROM clause of a query to specify another source database.  The
secondary source can be a Jet (Access) database or any Jet accessible source
(Excel, DBase, Text, etc.) or any ODBC connection (dynamic connect string).

To set this up create an empty Access database and then create a datasource
for this database named "PassThroughMDB".

Then you can run queries like:

<cfquery name="getFromDynamicConnection" datasource="PassThroughMDB">
  SELECT *
  FROM some_table_in_another_db IN 'c:\wherever\other_database.mdb'
</cfquery>

You can experiment with paths to an MDB, XLS, etc. or you can use an ODBC
connect string.  To use ODBC I believe you have prepend it with ODBC; as in

FROM wherever IN 'ODBC; [dynamic odbc connect string]'

See MS Access help for more information.  You can also view some examples in
MSDN Library.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm
l/acsqlINX.asp

Another option is to create linked tables in the Access database.  I know
you can do this with DAO, and you may be able to do it with some combination
of ADOX/JRO or even with DDL through CFQUERY.

If using MSSQL or Oracle (and if so why would you need a dynamic connect
string?) you can use linked databases (perhaps they use a different term,
but the concept exists in both).

Good luck!

Sam

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: <"Bruce>; <Rodney S HQISEC/Veridian IT Services
<[EMAIL PROTECTED]>>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 11:13 AM
Subject: DSNless connection


> Hello all
>
>
> We are looking into upgrading to CFMX from CF5, but one issue we
> have not been able to overcome is that
> CFMX does not have DSNless db connections.
> Is there a way in CFMX to create a DSN connection on the fly, i.e. not
> having to go to CF Admin to create the mapping?
>
> Currently we have engineers that go all over the world (Europe, Japan,
> Korea, etc), so they some times have very limited
> access to GOOD internet access.
>
> SO, We have developed an MS ACCESS db application that they take a copy
of,
> with them to what every site they are going to survey.
>
> Upon returning they upload the db to the website.
>
> Currently the db is renamed at upload to conform to the surveyed sites
> naming convention and the db dir is saved to table on the server(central
db)
> and later this is pulled to create the DSNless connection to access the
> uploaded db,
> for displaying info on the website.
>
> Is there a way in CFMX to create the DSN connection when the db is
uploaded?
> Hope I have explained this enough.
>
>
> Thanks
> Rodney
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to