DBext (Vim) - a valid database type must be selected

Installed gvim for Windows and is trying to execute SQL Server SQL Server queries. Getting errors when trying to issue dbext specific commands. See details below.

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 selected

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

Please note that my plugin is installed correctly, and I see the plugin menu listing dbext commands.

+6
source share
2 answers

I myself dbext newb with the same setup. This error message appears when it cannot identify the profile. From what I read, he should suggest that you select a specific named profile at runtime, but this does not seem to work for me.

However, getting dbext to find out which named profile to load by default, adding the following line to _vimrc under the name of the named profile definition, it turned out:

 :let g:dbext_default_profile_mySQLServer = 'type=SQLSRV:integratedlogin=1:host=XXXXX:dbname=XXXXX' :let g:dbext_default_profile = 'mySQLServer' 
+4
source

You can use:

<leader>sbp or :DBPromptForBufferParameters

To display profiles that you previously saved in .vimrc

0
source

Source: https://habr.com/ru/post/983722/


All Articles