Bryan,

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


> Date: Wed, 25 Sep 2002 09:16:31 -0700
> From: "Bryan Stevenson" <[EMAIL PROTECTED]>
> Subject: connectstring in CFMX
> Message-ID: <008701c264ae$e95da230$6501a8c0@ectwork>
>
> Are DNS-less connections still possible in CFMX?  I'm getting an
> "Attribute
> validation error for tag query" error when  I try and use a connectstring.
>
> TIA
>
> Bryan Stevenson B.Comm.

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to