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

2

6

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.

Saccharose answered 12/3, 2015 at 22:57 Comment(1)
did you figure out how to fix this? I am haveing the same problemDestroyer
R
5

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'
Ravel answered 15/4, 2015 at 4:15 Comment(0)
D
0

You can use:

<leader>sbp or :DBPromptForBufferParameters

In order to display the profiles you've previously saved in your .vimrc

Dor answered 2/6, 2017 at 13:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.