Click here to Skip to main content
Click here to Skip to main content

Simple C# codegenerator for DB objects (table, store procedure)

, 7 Mar 2005
Rate this:
Please Sign up or sign in to vote.
This small utility generates code to call store procedure or C# class from Table
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->

Sample Image - gener.jpg

Introduction

This is a simple utility i wrote after working on a big project.

After i had to manually create code to call store procedures and every time i had to switch back and forth between Edit screen and database screen to find out necessary parameters, their types, and length i started to look for the wizard which will do it automatically.

After goggling for about 30 minutes i could not find anything but one tool for which author was asking $60 and trial version i downloaded did not work correctly (or in some cases would give GPF ) i decided to spend couple hours.

Since i am a C# programmer the code is generated is C# code. Also if you are using different naming convention than i am you may have to modify the source.

For some, totally unknown for me, reason i wrote the tool in VB 6 not in C#. Do not know why. But i did it Smile | :) .

Anyway download demo project and give it a try.

 

Documentation

1. First you will have to provide connection string to your SQL server. Copy and paste it from existing project.
IMPORTANT: Connection string must be in ADO format. Not ADO.NET. Example: Provider=SQLOLEDB.1;Password=pwd;Persist Security Info=True;User ID=sa;Initial Catalog=Database;Data Source=GTL

Do not be afraid program will remember it. So next time you bring it up it will have that string.

2. Choose an action and click generate. Or you can "Generate All" to generate code for all possible actions.

3. The program is totally unintelligent ( i spent only couple hours to work on it) and you will have to modify the code it generates (especially for and Update store procedure WHERE clause). But it serves it's purpose most tedious work is taken care of.

 

 

 

 

Thanks and enjoy.

Feel free to modify source code.

Email: gevorgspam@comcast.net  (remove 'spam' from my email)

Gevorg Ter-Saakov.

Body Jewelry. Labrets, Barbells, Nose screws, Piercing supply

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Gevorg
Web Developer
United States United States
I am a Senior Software developer who does a consulting work for several companies. Mostly it's an E-Commerce project.
 
I do have my own venture. Small online store my wife runs. Body Jewelry. Also visit Piercing info Cool thing is that nor I nor my wife has any piercings. My new website is Belly ring

Comments and Discussions

 
QuestionWhy should we use Code Generators? PinmemberIqbal M Khan15-Feb-07 1:43 
Generalhi Pinmemberman_chat22-Dec-06 2:59 
Generala better option Pinmemberkrausscarlos28-Jul-06 6:47 
Generalms access query and C# Pinmembershaw_luo27-Sep-04 21:27 
GeneralDALMaker.NET PinmemberTLWallace29-Dec-03 14:17 
QuestionVB? PinmemberDaniel Fisher (lennybacon)22-Dec-03 8:36 
AnswerRe: VB? Pinmembergevorg22-Dec-03 12:57 
GeneralRe: VB? Pinmemberralphw23-Dec-03 3:14 
GeneralRe: VB? Pinmembergevorg23-Dec-03 15:01 
GeneralRe: VB? PinmemberDaniel Fisher (lennybacon)23-Dec-03 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 7 Mar 2005
Article Copyright 2003 by Gevorg
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid