The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

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

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

If I try to execute that with ISQL (Java) 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
accept rate: 12%

edited 20 Aug '10, 14:54

Works for me, in the dbisql that ships with and 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

(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

(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 since that fails for Reimer.

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

@Breck: I copied and executed Reimer's code above on 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
accept rate: 21%

Comment Text Removed
Comment Text Removed

You've convinced me to stay on :)

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

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

(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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 18 Aug '10, 13:00

question was seen: 1,093 times

last updated: 20 Aug '10, 14:54