[dba-VB] SPAM-LOW: Re: Projects vs Solutions

jwcolby jwcolby at colbyconsulting.com
Fri Nov 20 06:26:10 CST 2009


The blind leading the blind here.

1) I built a main application
2) I referenced the existing file repair applet from the main application (project).
3) I set a using statement.  It appears that you have to both reference it and then use the "using" 
statement.
4) I can now open forms out in the file repair applet from the main application.
5) I physically moved the file repair applet underneath the main application directory.
6) I changed the directory for the applet and it just worked.  That was fairly easy.

 From this point on I "Add Project" to the main solution.  I have added a class project to wrap the 
DMO.  In case you haven't discovered it, the DMO is a real cool SQL Server Management Object API 
that allows you to see and manage database objects.  I am just getting into it but it allows me to 
reference a server object, then see the database collection.  The each database object has a table 
collection, the table object has a fields collection etc.  Everything you can see and manage in the 
SQL Server management studio you can (apparently) see and manage from the SMO from C#.

An example of what this does for me is allows me to see all of the databases in a server, and thus 
populate a combo with their names.  Selecting a database from the combo I can see and fill a combo 
with the names of the tables.  Selecting a database and a specific table I can then can then run my 
stored procedures that export that table in that database to CSV files.

That kind of stuff is what I do a lot of and what the big application will manage.

John W. Colby
www.ColbyConsulting.com


Mark Breen wrote:
> Hello John,
> 
> While I am not qualified to comment really on this subject, I am waiting /
> hoping that someone will let you now how you can move 90% of your applet to
> a DLL project, and then from  your main program you will just reference the
> DLL and consume the functionality within that DLL.
> 
> With that approach, you could start your library of the new Colby C#
> Framework, albeit a humble beginning.
> 
> Am I correct in assuming that with this approach you would compile your
> applet to to a DLL, and then you main program, which could be a winform or
> console app, could call applet.InputFilePathSet, applet.OutPutFileSet, and
> then applet.ParseFile etc etc.
> 
> Let I say, I am not qualified to advise on this, but perhaps some others
> would like to,
> 
> thanks
> 
> Mark
> 
> 
> 2009/11/19 jwcolby <jwcolby at colbyconsulting.com>
> 
>> Gustav,
>>
>> Well, the point is that I am doing my job and suddenly I have to do
>> something for the client that I
>> have no solution for.  This latest was a good example.  I tried to import
>> three files coming back
>> from a processing vendor and one imported, the other two failed.  So I
>> write an applet that scans
>> through the file sorting lines of the file into two output files, good and
>> bad.  When I am done the
>> remaining "good" file now imports.
>>
>> What do I do with this applet?  One thing I can do is to just leave it
>> where it is and hope I don't
>> lose it, because sure as the sun rises I will need to do this again.  Or do
>> I create a bigger
>> application, build a menu in it, and place this applet on the menu?
>>
>> Does this Fixit applet grow?  Conceivably, if I find some file that isn't
>> fixed (or problem found)
>> as easily as these files were, then this applet could grow to include
>> different tests.  This applet
>> has its own form with a set of text boxes to display paths / files, buttons
>> to select folders and
>> files and a button to perform the cleanup.  I probably will add another
>> button to open the resulting
>> "bad" file in an editor so that I can see and fix the problems in the data.
>>  Perhaps a button to
>> append the fixed lines back to the end of the "good" file before the
>> import.  Stuff like that.
>>
>> So applets can grow, and the main application grows as I write new applets
>> to perform various
>> processing tasks, and those new applets get added into the main
>> application.
>>
>> John W. Colby
>> www.ColbyConsulting.com
>>
>>
>> Gustav Brock wrote:
>>> Hi John
>>>
>>> This raises the question if your coming applet will be the new little
>> applet or will become a little bigger little applet from day one. Does a
>> little applet grow up?
>>> /gustav
>>>
>>>
>>>>>> jwcolby at colbyconsulting.com 19-11-2009 03:14 >>>
>>> Creating a reference to the other project solved the immediate problem of
>> referencing objects in the
>>> other project.
>>>
>>> John W. Colby
>>> www.ColbyConsulting.com
>> _______________________________________________
>> dba-VB mailing list
>> dba-VB at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/dba-vb
>> http://www.databaseadvisors.com
>>
>>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 



More information about the dba-VB mailing list