Quick Search for:  in language:    
VBNET,XML,SQL,Class,Generator,From,Databases,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
.Net Stats

 Code: 157,764. lines
 Jobs: 478. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for .Net.
Click here to see a screenshot of this code!Weather Buddy
By Roger Martin on 1/28

(Screen Shot)

On The Fly Image Resizing, And Saveing
By Chris Hood on 1/27


Click here to see a screenshot of this code!Zip/View Project
By Mähr Stefan on 1/27

(Screen Shot)

Quick Audit
By Thomas Michael McGeown on 1/27


Click here to see a screenshot of this code!Kill Timer
By Adam( ) on 1/26

(Screen Shot)

Fibonacci Function
By Paddy Pasqualmie on 1/25


ID3v1.1 Reader
By Lewis Moten on 1/25


Click here to see a screenshot of this code!Lotto Picker
By Mick Doherty on 1/24

(Screen Shot)

Load a PopUnder using InternetExplore r
By Norberto Olazabal on 1/23


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

DotNETGen

Print
Email
 
winzip icon
Submitted on: 8/4/2002 8:44:52 AM
By: Hilton Giesenow  
Level: Intermediate
User Rating: By 2 Users
Compatibility:C#, VB.NET, ASP.NET, C++.NET

Users have accessed this code 6666 times.
 
 
     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. You can contact me at shirna@mweb.co.za. Let me know any suggestions / comments, or at least briefly what you are using the app for. The service itself is at http://137.158.189.182/TempusFugit/wsclassgenerator.asmx Thanks, Hilton
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
10/2/2002 4:25:56 PM:
Where is the web service code. You 
would have to be on glue to think that 
I would give you the keys to my 
database. You shouldn't have wasted my 
time with this submission if you were 
not willing to release the source code 
for the service. Tell ya what. Send me 
your connection string to your database 
and lets see how much fun I can have 
with your databases.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/2/2002 7:59:21 PM:Hilton Giesenow
The connection string is to insert into 
the code for your convenience. If you 
don't want this, enter a blank value, 
and then change it in the files 
generated. Also, please take the time 
to figure out what a Web Service is 
before asking for the code?!??!? you 
might try visiting my site, or else the 
microsoft, sun, ibm, oracle, delphi, 
BEA, cape clear etc. etc. etc. websites.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/6/2002 7:16:03 PM:Enterprize VB SQL programer
I tried running your webservice, 
however your connection is not up and 
running.  I would not mind seeing your 
project working.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/18/2003 2:35:51 PM:
This is bogus. If you are going to post 
code post it all or dont waste peoples 
time promoting your commercial code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/24/2003 3:00:42 PM:Keir Gordon
I concur with all the other posts.  I 
am aware webservices are supposed to be 
a shared web function... but that idea 
has not come into fruition yet and we 
developers need the code.  Also you 
can't expect people to give you access 
to their database.  We are impressed by 
your code idea, but give us source! 
Thats the idea behind 
planet-source-code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | .Net Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.