![]() ![]() |
|
This is how DbPlus works1. Choose the type of Connection you want with the Combo-box [Connection]. 2a. Fill in "username" and "password" and click on [Login] if the connection needs this information. (Which Connections you can choose from is determined of the properties set in the file "Connections.xml", which contains some "default configurations" which can be useful for the configuration of further connections )
2b. If instead you want to run against a Microsoft Access/Jet-databasr, you choose that alternative in [Connection] and fill in the path to the mdb-file in the field "Database".
Instead of filling the path by hand, you can use the File Dialogue with [>>], and choose an mdb-file that way:
3. Now you come to the main window:
If you got a Connection without error, you'll see
4. To execute an SQL statement, you write it into the text field under the tab [SQL Statement] and click on the
button The text field will give "syntax highlight" for keyword in PL/SQL and T-SQL. Depending on if your command gives a RecordSet or not, the response will look differently. If it's an ordinary query, the result will be shown under the tab [Result], where you'll see the result of your query (you can change the size of the window and the width of columns simply by dragging the edges).
If your query goes wrong, or if the statement isn't a query, you'll be moved to the tab [Messages]:
Under the tab [Table Info] you'll find descriptions of tables and views in your "account":
With a "double click" on the field left of a specific table, you'll bring up a window with more information about that table.
Configuration tabsProvidersUnder the tab [Providers] you can add, delete or change the properties for the "Providers" you can choose.
This information can also be altered "manually" by editing the file providers.xml.
ConnectionsUnder the tab [Connections] you can add, remove or change the configuration of which "Connections" you can choose.
This information can also be altered "manually" by editing the file connections.xml.
Buttons in the toolbar
Known bugs"Syntax highlight" under the tab [SQL Statement] is missing some keyword and is extended only to PL/SQL (Oracle's dialect - a superset to SQL-92) and to some degree to T-SQL (Microsoft SQL Server). MS Access doesn't support all functions necessary to retrieve all of the the information under the tab [Table Info]. Certain commands (e.g. Commit and Rollback) gives "ugly" printouts in [Message] if no Connection is open... This version assumes that all statements (queries, etc) are formed in a way that they can be sent through ADO.NET, i.e. usually without a semi colon in the end... Some providers don't support transactions... Possible future workInformation under [Table Info] will be developed further, to suit even more databases genrically (at least to adapt to SQL-99). Possibly it will be formatted as a "CREATE TABLE...", to be "cut and pasted" to be used in other databases. There's already the possibility to run "scripts" though limited in this version of DbPlus. I've e.g. tried to create stored procedures on an SQL Server with success . NB, it's not "fail safe" and definitely not tested on that many databases... Why DbPlus in C#?As a lecturer in university courses I have used many different tools for the students, e.g. SQL*Plus from Oracle for "interactive SQL" to create tables and make queries.
I thought of the possibility to create some tool that could work in a similar way as e.g. SQL*Plus, but towards several DBMS, and with a simpler installation. I made some prototypes that I used in programming classes as examples on what could be done in Java and C#. Until now ADO.NET wasn't suitable, as we used Oracle, and it was necessary to install the Oracle SQL-client to make it work with ADO.NET. This is a first rewrite of the Java version we used, and still contains some constructions that are more "Java" than ".NET", but in principle the two versions are identical. The basic principle is to install a suitable ADO.NET-provider in the assembly catalogue (though sometimes with a special installation program) and then fill in some information about the provider and a connection.
|
![]() |
![]() |