Thanks for this great plugin, use it almost everyday. Have one request, would be great if variable can be use instead of parameters prompting, i.e:
set opt1 = "somevalue"; opt2 = "somevalue2" set opt1 = "othervalueset"; opt2 = "othervalueset2" SELECT * from imaginarytable WHERE field1 = :opt1 AND field2 = :opt2;
So one can select different value before executing above query. Thanks for great plugin. --JK October 27, 2011
- Not sure which version of dbext you are using. By default, when executing the SELECT statement it will prompt you for :opt1 and :opt2. It will then also save these values (for this buffer) and the next time you execute the a query using :opt1 or :opt2, it will ask if you want to use your saved values. You can see the saved values (and delete them) using <Leader>slr (SQL - List - vaRiables). That feature was added in version 11.1, the current version is 14.0 Dfishburn 11:45, April 5, 2012 (UTC)
- Version 20 does not prompt for connection profile
- I have two Mysql connection profile in my .vimrc file, works fine with v19. After upgrading to v20. dbext does not prompt for connection profile, I have to issue "\sbp" to select connection first otherwise it will display error "dbext:A valid database type must be chosen"
- Syntax highlight got removed after some actions sequence if dbext plugin installed.
- Steps to reproduce: open some file to edit. Enter
--January 25, 2012
- I can't reproduce this. If you can using the current version 14.0 please email me, as it will involve some back and forths. Dfishburn 11:45, April 5, 2012 (UTC)
- Using DBext from VIM on Microsoft Windows XP with Oracle Instant Client 11.2adds a single quote when it should add a double-quote. The command arguments sent to SQLPLUS do not get properly expanded and the command fails. Changing the code from
# Single quote causing problem # | # * sqlplus -S 'my_user/my_password@oracle_server" @c:\temp/dbext.sql
# Substituting double quote solves problem # | # * sqlplus -S "my_user/my_password@oracle_server" @c:\temp/dbext.sql
fixes the problem. Of course, this makes DBext useless unless there is a fix for this behavior. Elcidia 17:37, June 12, 2012 (UTC)
- A fix (version 16.0) for this was posted last night, please upgrade to the most current release of dbext. Dfishburn 21:58, June 12, 2012 (UTC)
- Update: Still not working for Windows command interpreter
I installed version 16.0 and I see that two single quotes are now issued to the command line. Unfortunately, on Windows, these should be double quotes and not single quotes. This is a limitation of the Windows as the command interpreter does not process single quotes (been that way since Windows 3.1 I think).
# What it should look like # double quote double quote # | | # + + sqlplus -S "my_user/my_password@oracle_server" @c:\temp/dbext.sql
As another idea, it would be cool if Powershell could be invoked. Elcidia 13:30, June 13, 2012 (UTC)
- Update: Version 17.0 is also not working with the Windows command interpreter for the reasons mentioned by @Elcidia.
let cmd = dbext_bin . \ ' ' . dbext#db_getwtype("cmd_options") . \ s:db_option(" '", s:db_get("user"), '') . \ s:db_option('/', s:db_get("passwd"), '') . \ s:db_option('@', s:db_get("srvname"), '') . \ s:db_option(' ', dbext#db_getwtypedefault("extra"), '') . \ "' @" . s:dbext_tempfile
let cmd = dbext_bin . \ ' ' . dbext#db_getwtype("cmd_options") . \ s:db_option(" \"", s:db_get("user"), '') . \ s:db_option('/', s:db_get("passwd"), '') . \ s:db_option('@', s:db_get("srvname"), '') . \ s:db_option(' ', dbext#db_getwtypedefault("extra"), '') . \ "\" @" . s:dbext_tempfile
in autoload/dbext.vim (ORA exec section) fixed the problem for me. --October 19, 2012