Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView Applet using an Ms Access Database

Status
Not open for further replies.

dubotho

Programmer
Mar 20, 2000
4
DE
I've got an Ms Access database which is a &quot;concentrate of useful information&quot; based on an Ms SQL Server Database.<br>
<br>
It contains the relations between objects (stored procedures, triggers and tables).<br>
<br>
I did it by simply :<br>
1-querying the database<br>
2-analysing each stored procedure(or trigger) script in order to know which stored procedures are executed or operations (insert, update, delete) done.<br>
<br>
A perl script permits me to do this stuff (pattern matching...)<br>
<br>
For instance, I would like to develop an Applet in order to have a hierarchical view of the relationships, to simulate the Windows Explorer on a web site. This applet would take its information in a text file.<br>
<br>
Ouf ... That's all ...<br>
<br>
One of my relation table looks like<br>
<br>
(stored_procedure/stored procedure):<br>
object_id_sp_calling<br>
object_id_sp_called<br>
<br>
and an example of it is :<br>
1 2<br>
1 3<br>
1 4<br>
1 5<br>
2 6<br>
2 7<br>
2 8<br>
3 9<br>
4 10<br>
5 11<br>
5 12<br>
5 13<br>
8 14<br>
<br>
I would like if it is possible by simply querying to obtain something like that :<br>
1<br>
1 2<br>
1 2 6<br>
1 2 7<br>
1 2 8<br>
1 2 8 14<br>
1 3<br>
1 3 9<br>
1 4<br>
1 4 10<br>
1 5<br>
1 5 11<br>
1 5 12<br>
1 5 13<br>
<br>
My Question is :<br>
It is possible to do this stuff ?<br>
<br>
Looking forward to hearing from U<br>
<br>
Excuse my poor english ...<br>
<br>
<br>
<br>
<br>

 
That should be do-able.<br>
<br>
In Psudo code<br>
read the table sequentially<br>
do while (or similar for each entry) loop <br>
use the called key as a foreign key and in the loop read the calling table. <br>
As long as there is a return add this relationship to your output string.<br>
When there is no additional foriegn keys (Calling) write the output sting out.<br>
read the next entry form the sequential file.<br>
<br>
as an option to writing the record out each time insert it into a temp table and then write the table on completion of the sequential reads.<br>
<br>
<br>
I hope this makes sense from a psudo code stand point. <p>Greg Amos<br><a href=mailto:amosgreg@ix(dot)netcom(dot)com replace(dot)>amosgreg@ix(dot)netcom(dot)com replace(dot)</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top