#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    16
    Rep Power
    0

    dsn-less connections


    how do I make a DSN-less connection? I am unable to update my databases over ftp to my server because the files are still in use. If I use a DSN-less connection, I hear that I can remedy this. Thanks
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968
    I'm not sure how to set up a DSN-less connection (never needed to), but I've always felt that the security risks of doing this were unacceptable, as is the fact that I'm pretty sure the connection is not maintained so there will be performance issues as well.

    Not sure what DB you are using...is it Access? Regardless, I believe all you need to do to release the connection is to send an invalid SQL statement that causes an error...something like

    SELECT * from aTableThatsNotThere

    should give an error and release the connection.

    Hope that helps.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    16
    Rep Power
    0
    So just create a blank page with this statement in it and I will be able to update my DB's? Yes they are access. Thanks
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    8
    Rep Power
    0
    Try this:

    <CFQUERY NAME="rs"
    DBTYPE="dynamic"
    CONNECTSTRING="Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\db\mydb.mdb;Uid=Admin;Pwd=;"
    >


    Basically just create a connection string and then reference it in the <cfquery> tag. I use it all the time, works great

IMN logo majestic logo threadwatch logo seochat tools logo