Click here to Skip to main content
15,881,757 members
Articles / Programming Languages / SQL
Article

SQL Tool designed using VB.NET

Rate me:
Please Sign up or sign in to vote.
3.12/5 (24 votes)
15 Jul 20043 min read 130K   2.1K   62   10
SQL Tool designed using VB.NET

User Manual

This is a Tool, which will work only with Oracle as Backend. The Main Functionality of this is as follows.

  1. We can apply all the Sql commands. Like
    1. Select
    2. Delete
    3. Create Table /Index/Sequence
    4. Alter Table
  2. We can able to See all the Table Name/Indexes & View Name
  3. We Can Get the Explain Plan for any Sqls

The Main Screen Look Like as follows

Image 1

Details

The First Step what we have to do is, we have to connect to Oracle. For that in this Tool, I have given Icon as follows.

Image 2

This is an Icon, which will let you connect to an Oracle DB. If you click on this Icon, a separate window will come, it will ask you for some parameter, after filling these parameters, it will connect to the oracle db.

This is a screen shot of the Connection Option.

Image 3

After Filling the UserId ,Password & Server, if the Parameters are correct, it will connect to the oracle.

After that we can apply all the commands. We have to apply the command in the Main Window, which is in white color, that is the Command Window. Assume that we are applying the following command in the command window.

  • SELECT DEPTCODE,DEPTNAME FROM FOMDEPT WHERE DEPTCODE = ‘PHA’

After you have typed this command we have to select the entire command and then we have to execute. To execute the selected command in this tool there is an icon like this

Image 4

If you press this icon the result will display in the bottom window, in the Bottom window there are 2 tabs there. One ‘Query’ Tab is to view the output and ‘Output’ tab will returns, how much rows affected like.

For any kind of commands if you type in the command window when you want to execute. The user has to block the command what they want to execute and then they have to press the execute button.

Image 5

This is one icon in that tool, which will used to find the Table Structure and the Indexes if any.

How to use that option, type any table name in the command window and block the table name, after that press this button. Then the output looks like this

Image 6

I have typed ‘ADMUSERS’ in the command window, I blocked the text, and pressed the ‘Find Object’ option. Then the result looks like the above. It is telling the Field Name in the table ‘AdmUsers’ and the Indexes and its column.

Image 7

This is one icon in that tool, this will tell us the explain plan of the selected sql command.

For an Example I have typed the following command in the command window and press the explain plan button. The result looks like this.

  • SELECT DEPTCODE,DEPTNAME FROM FOMDEPT WHERE DEPTCODE = ‘PHA’

Image 8

Image 9

This is one option this will tell all the Table Details, Index & View Details. The Output looks like below.

Image 10

The above output contains 3 tabs, The First tab tells you about the table details, the second one is for the indexes and the third one is for the views.

Image 11

This button is for commit if any delete/update statement.

Image 12

This is to Rollback.

Image 13

This is to disconnect the connection.

Technical Stuff in this Project

To List the output of any sql query command, I have used List View, this list view having a facility to sort by any column.

For the Explain Plan we should need the ‘plan_table’ this is the inbuilt table of oracle suppose if u r not having, please create the table, the structure of the table is as follows.

SQL
SQL> DESC plan_table

 Name           Null?    Type
 -------------- ----- -------------------
 STATEMENT_ID            VARCHAR2(30)
 TIMESTAMP               DATE
 REMARKS                 VARCHAR2(80)
 OPERATION               VARCHAR2(30)
 OPTIONS                 VARCHAR2(255)
 OBJECT_NODE             VARCHAR2(128)
 OBJECT_OWNER            VARCHAR2(30)
 OBJECT_NAME             VARCHAR2(30)
 OBJECT_INSTANCE         NUMBER(38)
 OBJECT_TYPE             VARCHAR2(30)
 OPTIMIZER               VARCHAR2(255)
 SEARCH_COLUMNS          NUMBER(38)
 ID                      NUMBER(38)
 PARENT_ID               NUMBER(38)
 POSITION                NUMBER(38)
 COST                    NUMBER(38)
 CARDINALITY             NUMBER(38)
 BYTES                   NUMBER(38)
 OTHER_TAG               VARCHAR2(255)
 PARTITION_START         VARCHAR2(255)
 PARTITION_STOP          VARCHAR2(255)
 PARTITION_ID            NUMBER(38)
 OTHER                   LONG
 DISTRIBUTION            VARCHAR2(30)
 CPU_COST                NUMBER(38)
 IO_COST                 NUMBER(38)
 TEMP_SPACE              NUMBER(38)
 ACCESS_PREDICATES       VARCHAR2(4000)
 FILTER_PREDICATES       VARCHAR2(4000)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Kuwait Kuwait
I am J. Franklin Kennedy, Working as a programmer in application software developement.


Comments and Discussions

 
Questionhi Pin
Member 999349622-Apr-13 15:55
Member 999349622-Apr-13 15:55 
GeneralMy vote of 2 Pin
Member 1000433522-Apr-13 0:56
professionalMember 1000433522-Apr-13 0:56 
GeneralApplying Unicode Pin
Sithy2-May-06 18:13
Sithy2-May-06 18:13 
Dear Sir/Madam,

I am currently developing an application using VB.Net as an interface and Microsoft SQL Server 2000 as a data store. All the data store are in Unicode because the client want to have everything in Khmer Lanaguage, Cambodia.

For the display of character, it shows perfectly. However, when I am doing a search for something such as name, or address, there were nothing came out as a result in both the query editor as well as sql embedded statement within the VB.Net.

I am looking to hearing from you soon.

Kind Regards,

Sithy

Sithy
Questionneed help... Pin
dasanudas21-Apr-06 17:45
dasanudas21-Apr-06 17:45 
QuestionPackage and Deployment Pin
Mahbub895717-Jan-06 23:14
Mahbub895717-Jan-06 23:14 
Questioni need a help about "network application libraries" Pin
abuassad_a12-Oct-05 17:31
abuassad_a12-Oct-05 17:31 
Generalre: vb application using sql index in searching Pin
meldaph7-Apr-05 19:13
meldaph7-Apr-05 19:13 
Generalplease help me ! Pin
shijutheertha18-Mar-05 3:23
shijutheertha18-Mar-05 3:23 
Generalkind attention Pin
shijutheertha18-Mar-05 3:14
shijutheertha18-Mar-05 3:14 
GeneralRe: kind attention Pin
ragibhusain18-Sep-06 2:10
ragibhusain18-Sep-06 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.