I may be asking for the world, but...

  • Is there a 3rd party program out there that will search the source code of a VB program and list table and databse names referenced in the program?

    Here is some background. Our company is in the beginning stages of normalizing the database/tables that already exist. There are numerous databases that were developed without the use of PK's

    As you can imagine we have many probles facing us, but our main problem, at this point, is how we find out what program utilizes what tables. For instance, we have found tables that we think are not being used and can be deleted. We are trying to avoid manually searching thru pages and pages of code to see if our thoughts are correct.

    We are hoping that there is some kind of program that will do this for us. In my internet search I found one program called

    Aivosto Project Analyzer. It documents many vb codes but does not specifically mention Databases and tables.

    Any suggestions would be greatly appreciated

    Karen

  • I certainly don't know such a program, but I might have some ideas how to solve this problem.

    They both boil down to having (i) some search criterium and (ii) having an application that allows you to search multiple files for multiple text strings.

    I believe you have two options :

    1. If database handling in your VB code is normalised or standardised in some way, you could search for the standard way of accessing a database. This can be naming convention, encapsulating functions or code, comments, anything really. (SELECT, UPDATE, INSERT, DELETE and EXEC might get you started )

    2. You could make a list of all your database objects (which shouldn't be too difficult using sysobjects and syscolumns), and then use some sort of search program to look for those names.

    From your description, I would go for option 2. You could easily see which objects are not used in your applications.

  • Hi,

    If you only havethe source code and not visual studio , you can use ultra-edit to search for strings in multiple files.

    regards,

    Klaas-Jan

  • Follow this link. It points to a piece of Perl code that allows you to look through a bunch of files for one or more 'patterns'.

    http://www.mts.net/~pb999874/perl/pgreppl.txt

  • I was aksed to track the same type of thing on an asp application in a prior job. I set up a test enviroment to duplicate the real one, and run a full profile trace on the app as I went through it. I was careful to use every single button or function during the run, and when I was done, had a table of every call made to every table and field in the database. Of course, this is tedious, and you often need to break down stored procs into table, field calls to map it properly, but it was thorough.

  • You are in luck - as long as your company has deep pockets - SQLCast, http://www.castsoftware.com/.

    It does other things, but a side benefit is that it will give you a list utilizing VB, C++ and ASP. The one caveat is that you need the source code. It also generates invaluable pictures of the relationships of buttons to screens to tables to prcos, etc.

    Too much to list here. Check out their website for more information.

    Be great!

    Michael


    Be great!
    Michael

  • Well, without knowing of any other application like that you probably could build something that could do quite easy depending on how the VB code is put together. Also, if any stored procedures are used then you need to also check the code for that. You might want to check at http://www.rentacoder.com to see if someone would write an app to do this for a better price, also you would then have source code for that app so you could improve it later if you wanted. If you want a really good price put in your request you will allow them to keep the source, that you just want non-exclusive rights to the source code which you have to make no further payment or have any further obligations to the developer involved (thus they can legally resell and it makes it worth their time).

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I want to thank you all for your suggestions and help - I will check out all of your leads

    Karen

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply