Error Executing Access Database Query

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

  1. #1

    Default Error Executing Access Database Query

    The query works in 5, chokes in MX7
    Error Message:

    Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or
    'UPDATE'.

    The error occurred in
    C:\Inetpub\wwwroot\srd\land\restr_areas\CountySear chCode.cfm: line 3
    Called from C:\Inetpub\wwwroot\srd\land\restr_areas\index.cfm: line 26
    Called from C:\Inetpub\wwwroot\srd\land\restr_areas\CountySear chCode.cfm: line
    3
    Called from C:\Inetpub\wwwroot\srd\land\restr_areas\index.cfm: line 26

    1 : <CFStoredProc Procedure="qWebAreasMenu"
    Datasource="srd_RestrictedAreas">
    2 : <CFProcParam value="#CountyName#" cfsqltype="CF_SQL_VARCHAR"
    type="In">
    3 : <CFProcResult Name="C_Menu_Options" maxrows="-1">
    4 : </CFStoredProc>
    5 :


    --------------------------------------------------------------------------------

    SQL {call qWebAreasMenu( (param 1) )}
    DATASOURCE srd_RestrictedAreas
    VENDORERRORCODE 3092
    SQLSTATE &nbsp;

    Please try the following:
    Check the ColdFusion documentation to verify that you are using the correct
    syntax.
    Search the Knowledge Base to find a solution to your problem.


    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
    1.1.4322)
    Remote Address 142.94.5.96
    Referrer [url]http://d-c-240186/srd/land/restr_areas/[/url]
    Date/Time 15-Apr-05 10:36 AM

    -----------------------------------------------------------
    Access Query:

    PARAMETERS pCountyName Text ( 255 );
    SELECT [Counties].[RecNo], [Counties].[CountyName],
    [Counties].[CountyShortName], [RestrAreas].[FileName], [RestrAreas].[RestrNo]
    FROM RestrAreas RIGHT JOIN (Counties RIGHT JOIN Pointers ON
    [Counties].[RecNo]=[Pointers].[CountyRecNo1]) ON
    [RestrAreas].[RestrNo]=[Pointers].[RestrNo]
    WHERE ((([Counties].[CountyName])=[pCountyName]))
    ORDER BY [Counties].[CountyShortName], [RestrAreas].[RestrNo];



    kschock Guest

  2. Similar Questions and Discussions

    1. Error Executing Database Query
      I have a website, which is visited by 18.000 unique users a day, who view almost 900.000 pages As you can see, one user views a lot of pages....
    2. Error Executing Database Query.
      The error occurred in C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutorial\index.cfm: line 2 2 : <cfquery name="atrwork"...
    3. error executing database query on login
      I've noticed we started getting this message when you try to Login to the website. We have recently just installed the CF standard edition 7.0 We...
    4. another Error executing database query
      Just when I thought I had all my forms finely tuned, I get the error below, which has me stumped (using DrmWeaver 2004, CF7, mysql): Error...
    5. Error Executing Database Query. [Macromedia][SQLS
      I don't think it's hardware related. Too many people have reported this issue, and from what I've read NOT SOLID solution has been offered. This is...
  3. #2

    Default Re: Error Executing Access Database Query

    Interesting. As a test, I set up an Access 97 database with a parameter query
    saved as a stored procedure, and then called that procedure via CFSTOREDPROC in
    CF 7, exactly like you have done. I did not have any problems returning a
    result set. In fact, I set up my Access data source as both an ODBC socket DSN
    and a Microsoft Access DSN in CF administrator, and both worked exactly the
    same. (Note that you can do away with the maxrows="-1" attribute in your
    CFPROCRESULT tag, as that was a CF 5 "thing".

    How do your other queries behave. Are you able to successfully execute any SQL
    via CFQUERY tags? I played around in CF Admin by disabling stored procedures in
    the DSN, but when I did that, I got a distinct message that stated that Stored
    Procedures were not allowed, so I don't think your problem is that DSN setup
    parameter.

    Sorry that I was not any help, but at least I know that I am able to call an
    Access 97 "stored proc" via CF 7.

    Phil :beer;

    paross1 Guest

  4. #3

    Default Re: Error Executing Access Database Query

    Phil,
    We are using Access 2000 (9.0.4402 sr-1). OS: Windows 2000 (service pack 4) Any query made from the cfm pages work, it just won't allow parameters to be passed.
    kschock 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