Skip to content

aneelm/NppDB

 
 

Repository files navigation

NppDB

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.

GUI Features

structure image

  1. 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
  2. SQL Result
    • Show SQL execution messages and query results
  3. Editor
    • Write SQL statements

Currently Supported Database Management Systems

  • MS Access
  • PostgreSQL

Requirements

Installation

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'.

Unblock

Quick Start Guide

  1. Open "Database connect manager" (F10).
  2. Register MS Access or PostgreSQL database
    1. 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.
    2. For PostgreSQL register a new connection and fill out all the connection details.
  3. Expand the database tree to view database objects as you wish.
  4. Write some SQL statements in the editor.
  5. Execute written SQL statement(s) (F9). You can execute either the selected statement(s) or the statement on which the text cursor is located.

Usage

Open Database Connect Manager

Select 'NppDB/Database Connect Manager' from Notepad++ plugin menu or Click icon Database Connect Manager Icon from a toolbar

Register new database server

  1. Click icon Regiser Icon from Database-Connect-Manager's toolbar
  2. Select one of database types
  3. Database Connect Node is registered in Database Connect Manager by pass authentication which selected database module produce. Select Database Type
  4. Connect to database server

Getting into detail about sub elements

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 SQL Linked Database Node

Executing sql statement

  1. Check that current document can execute sql statement. (ok if with sql-result )
  2. Write a sql statement and then select a block of the statement. Select Blocks
  3. 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.

License

MIT

About

Notepad++ Plugin to connect a database and execute a sql query

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%