This is a repository containing further implementation of NppDB for my bachelors thesis "Further Development of a Plugin that Simplifies SQL Programming in MS Access and PostgreSQL for Source Code Editor Notepad++". NppDB is a Notepad++ plugin originally developed by Sangkyu Jung for supporting connection to different databases, execute SQL statements and show query results, and further developed by Priit Post.
- Database Connect Manager
- Register, unregister, connect and disconnect databases
- Represent the database objects in tree structure
- Attach and detach to editor window for executing SQL statements
- SQL Result
- Show SQL execution messages and query results
- Editor
- Write SQL statements
- MS Access
- PostgreSQL
- Notepad++ 64-bit version (tested with 8.4.7 or 8.4.9)
- .Net Framework 4.8
- MS Access Database Engine 2010 Redistributable (driver) or MS Access Database Engine 2016 Redistributable (driver). The 64-bit driver version can be downloaded here: https://download.cnet.com/microsoft-access-database-engine-2010-redistributable-64-bit/3000-10254_4-75452796.html or here https://www.microsoft.com/en-us/download/details.aspx?id=54920&irgwc=1. If you also have MS Access installed on your computer, in the folder where you downloaded the driver, open the Windows Command Prompt with administrator rights and run the command: "accessdatabaseengine_X64 /quiet". (to use MS Access database)
- ANTLR 4.11.1 or 4.13.1 (for development)
Copy compiled .dll files from project folder or downloaded .zip package package as follows:
- Place the file "NppDB.Comm.dll" in the root folder of Notepad++ program folder, where "notepad++.exe" is located.
- Move the remaining .dll and translation.ini files to the "./plugins/NppDB" folder.
- If you have get an error when starting up Notepad++ after installing the plugin, make sure all the copied .dll files are unblocked, by right-clicking on them and opening properties, and if possible checking box 'unblock'.
- Open "Database connect manager" (F10).
- Register MS Access or PostgreSQL database
- For MS Access register new or existing database (.accdb, .mdb) from local filesystem in the manager window, if there is no password, in the password window just click OK.
- For PostgreSQL register a new connection and fill out all the connection details.
- Expand the database tree to view database objects as you wish.
- Write some SQL statements in the editor.
- Execute written SQL statement(s) (F9). You can execute either the selected statement(s) or the statement on which the text cursor is located.
Select 'NppDB/Database Connect Manager' from Notepad++ plugin menu or Click icon from a toolbar
- Click icon from Database-Connect-Manager's toolbar
- Select one of database types
- Database Connect Node is registered in Database Connect Manager by pass authentication which selected database module produce.
- Connect to database server
Double-click on the nodes to expands sub elements in the database connection manager. If no connection has been made to the database, a connection window will open asking you to connect.
- First, select 'Open' from database node's popup
- Second, select prepared sql statements such as 'SELECT … Top 100' or 'SELECT *' or 'DROP' from table node's popup
- Check that current document can execute sql statement. (ok if with sql-result )
- Write a sql statement and then select a block of the statement.
- In NppDB plugin menu click 'Execute SQL (F9 shortcut key)' or use the F9 shortcut key to run the sql statement and display the results.
MIT