Forum OpenACS Q&A: Re: ERROR: parser: parse error at or near "*"

Collapse
Posted by Nathan Mickson on
Thanks Randy, I accidently named the index.xql file with extension .sql instead

But now having fixed that and reloaded i get this error:

Request Error

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  Relation "samplenote" does not exist

SQL:
    select note_id,
          title,
          body
      from samplenote

order by title asc

    while executing
"ns_pg_bind select nsdb0 {
    select note_id,
          title,
          body
      from samplenote

order by title asc
    }"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec select $Tdb $full_statement_name $sql_qry"
    invoked from within
"set selection [db_exec select $Tdb $full_statement_name $sql_qry]"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle Tdb {
    # Execute the query
        set selection [db_exec select $Tdb $full_statement_name $sql_qry]
    set Tcount 0
    set Tband_count 0
    ..."
    (procedure "ad_table" line 7)
    invoked from within
"ad_table -Torderby $orderby notes_query { *SQL* } $table_def"
    invoked from within
"set table_html [ad_table -Torderby $orderby notes_query { *SQL* } $table_def]"
    ("uplevel" body line 24)
    invoked from within
"uplevel {
          ad_page_contract {
    This is the main page for the package.  It displays all of the Notes and provides links to edit them and to cr..."
    (procedure "code::tcl::/web/service0/packages/samplenote/www/index" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    $handler
      } ad_script_abort val {
    # do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    rp_serve_abstract_file "$root/$path"
    set tcl_url2file([ad_conn url]) [ad_conn file]
    set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

Would you be able to tell me what this is all about?

NM