I encountered an error executing a CREATE PROCEDURE statement and burned it down to the following example:

create procedure CommentTest 
as 
begin
  -- a comment's text may not contain any single quotes
  select 1 from dummy
end

If I try to execute that with ISQL (Java) 11.0.1.2467 it gives me an error:

Could not execute statement.
Syntax error or access violation
SQLCODE=0, ODBC 3 State="42000"

The same statement works with the C-Version of ISQL (dbisqlc.exe).
Might I call this a bug or a feature?

asked 18 Aug '10, 13:00

Reimer%20Pods's gravatar image

Reimer Pods
4.2k354583
accept rate: 11%

edited 20 Aug '10, 14:54

Works for me, in the dbisql that ships with 11.0.1.2276 and 12.0.0.2483. What version are you using? FWIW I have bazillions of -- comments containing embedded quotes, never a problem.

(18 Aug '10, 13:22) Breck Carter

Fine in 10.0.1.3931

(18 Aug '10, 13:45) Justin Willey

Must be version specific, it works too in 12.00.2483

(18 Aug '10, 15:32) Reimer Pods

Works on 11.0.1.2467

(18 Aug '10, 18:25) Vincent Buck

@Vincent: Please re-confirm that Reimer's exact procedure (which is in Transact SQL syntax) works for you on 11.0.1.2467... since that fails for Reimer.

(20 Aug '10, 16:00) Breck Carter

@Breck: I copied and executed Reimer's code above on 11.0.1.2467 without a glitch. I also have tons of comments with single quotes in them

(20 Aug '10, 17:58) Vincent Buck
More comments hidden
showing 5 of 6 show all flat view

Yes, single quotes are allowed inside -- comments.

There may (must?) be something else going wrong with your example... what version of SQL Anywhere are you using?

permanent link

answered 18 Aug '10, 13:32

Breck%20Carter's gravatar image

Breck Carter
27.0k444614889
accept rate: 21%

Comment Text Removed
Comment Text Removed

You've convinced me to stay on 11.0.1.2276 :)

(18 Aug '10, 16:09) Breck Carter

Re-Edited my question to fix version info: it's really 11.0.1.2467. Same thing on another machine using 11.0.1.2376.

(20 Aug '10, 15:22) Reimer Pods
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×106
×14

question asked: 18 Aug '10, 13:00

question was seen: 950 times

last updated: 20 Aug '10, 14:54