Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBext (Vim) - A Valid Database type must be chosen

Installed gvim on Windows and trying to run (Microsoft)sql server queries. Getting errors when I try to issue commands specific to dbext. Please see below for details.

Vimrc contains this connection string

:let g:dbext_default_profile_mySQLServer  = 'type=SQLSRV:integratedlogin=1:host=XXXXX:dbname=XXXXX'

SQL Statement

Select * from XXXXX

command:

<leader>se (in my case ,se)

Error: "A Valid database type must be chosen"

Can someone help me fix this problem in gvim + dbext set up.

Please note my plugin is installed properly and I see the plugin menu that list dbext commands.

like image 222
Pradeep Krishnaraj Avatar asked Mar 12 '15 22:03

Pradeep Krishnaraj


1 Answers

I'm a dbext newb myself with the exact same setup. That error message appears to be thrown whenever it can't identify the profile. From what I've read it should prompt you to select a specific named profile on execution but this doesn't seem to work for me.

However, getting dbext to recognize which named profile to load by default by adding the following line to the _vimrc under the named profile definition did get it working:

:let g:dbext_default_profile_mySQLServer = 'type=SQLSRV:integratedlogin=1:host=XXXXX:dbname=XXXXX'
:let g:dbext_default_profile = 'mySQLServer'
like image 109
silijon Avatar answered Sep 20 '22 06:09

silijon