VB.NET Class Generator From Databases - In order to simplify the interaction with a database and decrease development time, many systems contain classes that represent database objects. For example, one could create a "Customer" class with "Name" and "Email" properties and "Update" and "Delete" methods. These actions and properties would be interacting with the database in the background, thus abstracting the user from the lower-level DB details. I have written a web service that receives an XML dataset as a parameter, and returns a string array representing the automatically generated classes and collections to achieve what is described above. This web service can be called from any application in virtually any language. The code provided here is one implementation written in VB.NET that takes a SQL Server connection string, builds the database structure in a dataset, and writes out the files to a supplied path. Restrictions: The current restrictions for this app are that the table can have only 1 primary key field, and this key field must be numeric. Also, the app automatically attempts to connect to certain stored procedures. The names of these stored procedures are taken from the table name. These names are (for e.g. with a table called tblCustomer) To view all records : spCustomersView To view 1 record : spCustomerView To add a record : spCustomerAdd To edit a record : spCustomerEdit To delete a record : spCustomerDelete To change the names of these Stored Procs, just locate them in the .vb text and change them. to not use Stored procs, change the s.p. name to SQL text, and change the StoredProcedure value of the database command / DataAdapter to CommandText. Also, a note on names. The app requires each table to have an initial capital letter. This is because I use naming conventions for my tables. Normal tables have a prefix of "tbl". Linking tables are prefixed "tlnk", and lookup tables (for genders, for example) are prefixed "tlk". For example, a customer table would be called tblCustomer. However, Customer would work ok too. This app forms part of an Honours course. As such, I would greatly appreciate feedback.
File List:
@PSC_ReadMe_446_10.txt
3Kb
AssemblyInfo.vb
1Kb
DotNETGen.sln
1Kb
DotNETGen.suo
8Kb
DotNETGen.vbproj
7Kb
DotNETGen.vbproj.user
2Kb
GenerateVB.vb
6Kb
Web References/TempusFugit/
0b
Web References/TempusFugit/Reference.map
1Kb
Web References/TempusFugit/Reference.vb
3Kb
Web References/TempusFugit/WSClassGenerator.disco
1Kb
Web References/TempusFugit/WSClassGenerator.wsdl
4Kb
bin/DotNETGen.pdb
40Kb
frmDotNETGen.resx
6Kb
frmDotNETGen.vb
3Kb
frmGenerate.resx
6Kb
frmGenerate.vb
4Kb
frmInput.resx
6Kb
frmInput.vb
4Kb
obj/Debug/
0b
obj/Debug/DotNETGen.frmDotNETGen.resources
1Kb
obj/Debug/DotNETGen.frmGenerate.resources
1Kb
obj/Debug/DotNETGen.frmInput.resources
1Kb
obj/Debug/DotNETGen.pdb
40Kb
obj/Debug/TempPE/
0b
obj/Debug/temp/
0b
Similar code
COM object has been separated from its underlying RCW can not be used
(Popularity: ) : In development everything seems all right. I used the Adobe acrobat reader component in my project. Very cool component. However in the rollout on windows 2000 computers it crashed before showing anything. With the error “COM object has been separated ... VB6 Rnd() <> .NET Rnd()
(Popularity: ) : The Rnd function in VB6 returns slightly different values than .NETs Rnd function. This can cause logical errors when migrating projects from VB6 to .NET This simple application shows how to fix the problem. Tracing Tools - Resubmit
(Popularity: ) : Demonstrates two features: 1) how to create and add custom TraceListeners to your project. TraceListeners are the output's from Debug.X and Assert.X. 2) how to create a custom tracer with varied levels of output. Read the Info.txt included in the ... Debug Panel
(Popularity: ) : [Updated 2005-12-23] Debug Panel is a VB User Control useful for enhancing the ASP.NET trace panel by adding a few missing items such as: A navigation index (which shows only the section you want and hides all other sections); A ... Trace Listener
(Popularity: ) : This project offers two methods to assist with debugging a .NET solution where one is IDE only and the second can be used after deployment or during the testing phase of a project. TracingTools
(Popularity: ) : Demonstrates two features: 1) how to create and add custom TraceListeners to your project. TraceListeners are the output's from Debug.X and Assert.X. 2) how to create a custom tracer with varied levels of output. Read the Info.txt included in the ... Sub Classing (the .NET Way)
(Popularity: ) : Back to SubClassing. Now you can subclass any Control to receive Windows Messages, any message. This is the Pure .NET way to Subclass (debug actually) any control. Code is fully commented and easy to understand. Hope this will be good ...