It's been a while since my JSP days, but I know for a fact that you can do DSN-less 
connections from JSP.  I'm having a
hard time finding my code but this page may offer some assistance
http://forum.java.sun.com/thread.jsp?forum=48&thread=137157&message=369435

E

----- Original Message ----- 
From: "Bryan Stevenson" <[EMAIL PROTECTED]>


Hey Mark....there's a totally different way of doing this in MX....here's a
reply to my request for the same info months ago...reply from Samual R.
Neff:

-----------------------------------------------
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
------------------------------------------------

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: "Mark Leder" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 11:35 AM
Subject: CFMX Datasource connection string


> I just recently converted a shared site at an ISP from CF5 to CFMX.  With
> CF5 I used a DSN-less connection string to connect to a SQL2000 shared db.
> Now, as I know, CFMX won't accept DSN-less strings.  Problem is, I don't
> know how to plug in the parameters into a CFQUERY.  Specifically, where do
I
> put the network connection string that the ISP supplies?  I notice that
> since its left off in my CFMX query statements, performance in doing a
query
> is extremely slow (because the query is looking all over the network for
my
> db).  The DSN string supplied to me to use is as follows:
>
> "dsn=abcd;uid=myUserID;pwd=myPassword;network=dbmssql"
>
> Here's my <cfquery> statement:
>
> <cfquery name="qProduct" datasource="abcd" username="myUserID"
> password="myPassword">
>
> This works, albeit slow.  So what setting do I use to point to the
network?
> There's so many Cfquery parameters that are deprecated in CFMX I'm at a
loss
> of what to do.
>
> Thanks, Mark
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

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

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

Reply via email to