[This topic is migrated from our old forums. The original author name has been removed]
In the SQL editor, if a comment is added before a query and the query is executed using "Ctrl+Period" dbvis responds with "Could not find any statement at cursor position to execute!".
To reproduce, enter the following into the SQL editor:
-- some comment here
SELECT * FROM sometable;
It does not matter if the table does not exist. Position the cursor somewhere on the query and press press "Ctrl+Period". The query will not be executed, and the above mentioned error will pop up.
It does not seem to be related to the database/driver, only the GUI. Tried with mysql and informix.
Product: DbVisualizer Personal 7.1.5
Build: #1590 (2011/02/24 17:23)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.6.0_24
Java Vendor: Sun Microsystems Inc.
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1
Regards,
Ivan
Ivan,
I just tried this with 7.1.5 and cannot reproduce. It might be some setting in your environment that causes this behavior. Please email (don't post in this forum) your settings file. It is located in C:\Documents and Settings\\.dbvis\config70\dbvis.xml
Regards
Roger
support@dbvis.com
a
anonymous
said
over 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Comments prevent Ctrl+Period from working
Yes, I'm having the same problem at this exact moment. I have several tabs open. In one I can reproduce the issue, but not in the others. Weird. I'll send you the file.
Regards,
Ivan
a
anonymous
said
over 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Comments prevent Ctrl+Period from working
Great, now I have two tabs (out of many) in which I can reproduce it, but I don't know why only those two.
Also, when I press Ctrl+Enter in those tabs, i get the following text in the log:
... 0 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 0 errors]
If I manage to reproduce it consistently I will let you know...
Ivan
a
anonymous
said
over 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Comments prevent Ctrl+Period from working
I have managed to reproduce this problem consistently. It seems that it has something to do with loading SQL files from disk.
Here is an example file which causes the problem:
http://dl.dropbox.com/u/12408003/test.sql
When I open this file in dbvisualizer and try to execute the statement using Ctrl+Enter or Ctrl+Period I get the issue I described above.
When I open the file in a text editor, and copy / paste the contents into dbvis then the problem does *not* manifest itself.
Hans Bergsten
said
over 13 years ago
[This reply is migrated from our old forums.]
Re: Comments prevent Ctrl+Period from working
Hi Ivan,
Thanks for finding a reproducible case. I have confirmed this, and it happens for files that use a single CR character as linefeed (LF, Unix and Mac OS X style, and CR+LF, Windows style) works fine). Files like this have most likely been created on a Mac OS 9 platform.
I have opened a ticket for this. Note that it throws the statement parser off, so there may be other effects in addition to what you have seen. Until this is fixed, I suggest you convert these files to Unix or Windows format. You may be able to find some command line tool to do this. Otherwise you can open and save the file in WordPad on Windows to convert to CR+LF.
Best Regards,
Hans
a
anonymous
said
over 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Comments prevent Ctrl+Period from working
I 'm not quite sure how I ended up with CR line breaks since I use only windows and linux, but I have converted them and the issue is resolved for me. Thanks for the response.
Roger Bjärevall
said
about 13 years ago
[This reply is migrated from our old forums.]
Re: Comments prevent Ctrl+Period from working
Hi,
This is now fixed in 8.0.2 version.
Regards
Roger
anonymous