Just made a version of Borje Hagsten's EDM32.inc to do SQL editing, if of interest let me know & I'll post it. It's not sophisticated, just highlights keywords (SQLite, easy to change a data statement) and literals, as I have not yet worked out how to do comments.
Announcement
Collapse
No announcement yet.
SQL editor
Collapse
X
-
WinSQL does comments by using a double-dash ( "--") at the start of the line. You could stea... er, 'adapt' that idea.Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
-
> I guess that depens on which characters the DBMS uses as a comment notifier
No, no. no... You strip out the comments BEFORE you pass the rest of the statement to the DBMS!Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
Originally posted by Knuth Konrad View PostI guess that depens on which characters the DBMS uses as a comment notifier.
Comment
-
Multiline comments using Borje's EDM32 is not easy to do - that's one of the reasons why I ended up writing my own code editing component from scratch (that and code folding).
I can't give you the source code, but if you would like to use the component (which helps me in the testing of it!), you can email me at [email protected]Paul Squires
FireFly Visual Designer (for PowerBASIC Windows 10+)
Version 3 now available.
http://www.planetsquires.com
Comment
-
Paul, thanks for your kind offer. I will defer response, if I may, until I have reached the point of exhaustion with EDM32.
One thing I need to do with the editor is to select data from other controls and insert it into the editor at caret position, without using the clipboard. My guess is that yours does this too?
Comment
-
Stripping out comments from SQL statement
Hi,
Here's a sub that I use for stripping out comments from SQL statements before executing the SQL call.
Eigil
'-----------------------------------------------------------------
'Removes comments of syntax /* .............*/ from a string. Works with 'multiline comments.
'----------------------------------------------------------------
SUB RemoveComments(instring AS STRING)
LOCAL sMain,sSrc,sMask ,sTmp,sRepl AS STRING
LOCAL lPos AS LONG
sSrc = instring
sMask = "/\*[^\*/]+\*/" 'searching mask
sRepl= ""
DO
REGREPL sMask IN sSrc WITH sRepl AT lpos TO lpos, sTmp
sSrc = sTmp
LOOP WHILE lPos
instring =sTmp
END SUB
Comment
Comment