Error accessing database

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Error accessing database

    This is not working for some reason it is telling me that ds_products does not
    exist. here is the code...
    <CFQUERY NAME="products" DATASOURCE="ds_products">
    SELECT ProductName
    FROM tblProducts
    </CFQUERY>
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <h1>Product Listing</h1>
    <ul><li><CFOUTPUT QUERY="products">
    #ProductName#
    </CFOUTPUT></li></ul>

    </body>
    </html>

    krazykrisi Guest

  2. Similar Questions and Discussions

    1. Accessing database
      I've succesfully built cfm webpage from the getting started tutorial of CF MX7. Refering to the tutorial i wonder if i can let a user to edit the...
    2. Accessing database using a date
      From time to time I access records in the database using a date and time field. My ISP has just upgraded from ColdFusion 5 to ColdFusion MX 6.1. My...
    3. ADO error accessing - Access Database
      Hello, I have an Access database that is setup as a System Datasource on a Win2k Server. This Access database is accessed by about 15...
    4. Accessing a database from two locations
      I just found this group so I don't know if this has been discussed previously. Is there a simple way for my partner and me to use the same...
    5. accessing database question
      Is there a downside to using multiple tables in an Access database file that is having information written to the different tables and accessed at...
  3. #2

    Default Re: Error accessing database

    1. make sure you have the dsn setup in windows
    2. make sure you have the dsn setup in cf administrator
    3. is ds_products the actual dns name and is capitalization identical?
    4. is ds_products actually an application or session variable referencing the
    real dsn? In which case it should be DATASOURCE="#application.ds_products# or
    "#session.ds_products#"

    hatethisnamegame Guest

  4. #3

    Default Re: Error accessing database

    what do you mean by dns? ds_products is a folder within the site folder which contains the products database.
    krazykrisi Guest

  5. #4

    Default Re: Error accessing database

    Follow these steps:
    1. Open your ColdFusion Admnistrator
    2. Click "Datasources"
    3. Do you see "ds_products" listed?
    If so, click the check box to verify the connection.
    If not, ds_products is probably a variable and you are missing the <cfset>
    command usually stored in the application.cfc/cfm (<cfset #ds_products# = >)

    This article may help you understand odbc connections. It is written for
    ColdFusion 5:

    [url]http://livedocs.macromedia.com/coldfusion/5.0/Installing_and_Configuring_ColdFus[/url]
    ion_Server/datasources8.htm

    LL@Work Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139