CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 8/24/2003 4:45:18 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 288 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
kevin.weir
Asp.Net User
CRUD Generator for SQL Server/VB8/24/2003 4:45:18 AM

1

Hi All

I have recently written a CRUD Generator that uses Microsoft.ApplicationBlocks.Data so if anyone is interested please let me know. The generated Classes and Stored procedures support ACID principles. The CRUD generator essentially encapsulates all my working knowledge into one neat little package to save myself considerable development time. (WinForms app)
I basically followed the KISS and 80/20 rules when writing this little app so it is by no means perfect. In my case the tool creates 70-90 percent of the data access code I will ever need for a given database in a matter of seconds.

The CRUD generator addresses the following issues:
Transactions - updates, inserts and delete methods are overloaded to support optional passing of transaction objects. In that way you could manually create a composite class that utilizes two or more CRUD generated classes and pass a transaction to all the participating objects. Either all the changes commit or everything is rolled back.

Optimistic concurrency - All a DBA needs to do is add CreatedDate (datetime) column to table and CRUD generator will create all the necessary logic to check for optimistic concurrency violation. Only stipulation is that the developer passes original Datetime value back to procedure so valid comparison can be made.

I leave cascading deletes and restricted deletes up to SQL server as it should be. In all delete stored procs the CRUD generator simply traps error 547 (foreign key violation) if user attempts to delete primary key that is referenced in another table. I then throw a friendly error message using RAISEERROR.

CRUD Generator Limitations: <-- I would not characterize these issues as limiatations but others may. ie C# developer
- Every table must use a single column to represent tables primary key. The column must utilize IDENTITY attribute and appear as first column in table.
- Binary data types are currently not supported.
- Only supports SQL Server
- Only VB code is generated

Some additional features of CRUD generator:
- User can point to new database by simply changing connection string in applications config file
- User can select one or more tables they wish to generate classes or stored procedures for
- User can specify namespace that all classes will utilize
- User can specify which methods and stored procedures are generated (i.e. insert, delete, update and so on)
- User can specify if they want datareaders or datasets returned to client applications.
- All the stored procedures are written to a single file for convenience
- Each table has its own class generated. The naming conventions is table name followed by DB suffix. For example, Employees table would have generated class called EmployeesDB.
- For CRUD generated select procedures the user may optionally define additional columns that are included from related tables
- The CRUD generator will generate select procedures for all foreign keys found in a table. By foreign keys I mean columns with a suffix of ID. ID is simply the convention I use. For example, imagine Employees table had a field called ManagerID. The CRUD generator would generate a stored procedure called EmployeesGetByManagerID that could be used to retrieve all the employees that fall under a given manager.


Regards,
Kevin Weir
[email protected]



roberthking
Asp.Net User
Re: CRUD Generator for SQL Server/VB12/19/2003 6:57:15 PM

0

Kevin,

Sounds interesting. It also sounds like it probably DOES hit the 80% mark.

I'd like to check it out.

Bob King
[email protected]
Thought for the day: Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic.
klenne
Asp.Net User
Re: CRUD Generator for SQL Server/VB1/13/2004 12:52:16 PM

0

Me as well!!!!

email [email protected]
designstylez
Asp.Net User
Re: CRUD Generator for SQL Server/VB1/23/2004 9:30:03 PM

0

I'm interested.

[email protected]

thanks.
sinclairgf
Asp.Net User
Re: CRUD Generator for SQL Server/VB2/17/2004 8:33:18 PM

0

I would like to see your generator. Sounds like a really good time saver.

Thanks,
George
[email protected]
mrbowling
Asp.Net User
Re: CRUD Generator for SQL Server/VB3/5/2004 7:04:44 PM

0

I would love to see a copy, it is just what I was looking for - getting ready to write my own.

MartinBowling AT wvdhhr.org
dubes
Asp.Net User
Re: CRUD Generator for SQL Server/VB3/16/2004 2:34:07 PM

0

Sounds pretty interesting, I'd really like to take a look at it-

Please send it to [email protected].

Thanks-
g5temp
Asp.Net User
Re: CRUD Generator for SQL Server/VB4/5/2004 10:45:11 PM

0

I'd like to see it too.
[email protected]
Thanks!
jimc2774
Asp.Net User
Re: CRUD Generator for SQL Server/VB4/9/2004 12:14:13 PM

0

<< Optimistic concurrency - All a DBA needs to do is add CreatedDate (datetime) column to table and CRUD generator will create all the necessary logic to check for optimistic concurrency violation. Only stipulation is that the developer passes original Datetime value back to procedure so valid comparison can be made. >>

what about Updates to the record?
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
CRUD Generator for SQL Server/VB - ASP.NET Forums Only supports SQL Server - Only VB code is generated. Some additional features of CRUD generator: - User can point to new database by simply ...
C# Code Generator, VB.NET Code Generator, SQL C# CRUD Code ... So I decided to create a code generator that takes the name of the object and the .... columns names at runtime from sql server and give user the option to specify ... NET code and CRUD from existing SQL tables. Try it ...
CodeProject: Generate Classes and CRUD Procedures. Free source ... May 5, 2009 ... SQL Class Shell Generator. Generate class shells from SQL Server database ... ( SQL 2005 & 2008 only). Output languages supported: C# and VB. ...
Free Code Generator for ASP C# NET / VB NET Object/DataLayer ... VB.NET Code Generator. MS SQL Code Generator. All in one web based free ... VB NET Object/DataLayer. Create database sql server stored procedures. ... Pure Objects is a VB.NET / C# Code generator as well as a SQL CRUD scripts generator. ...
php mysql code generator Code generator ASP.NET, C#, VB.NET SQL Server php mysql code generator Code generator ASP.NET, C#, VB.NET SQL Server. ... Generates User Friendly, Data-Entry / Enhanced CRUD (Create, Read, ...

CRUD Generator for SQL Server/VB - ng.asp-net-forum ... CRUD Generator for SQL Server/VB, > ROOT > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks, ...
database, vb.net code - data_access ... Code Generation Network - Generators for VB.NET Deklarit is generator with a GUI front end that builds both database ... crud generator for sql server/vb ...
How do I insert a WAV file into a SQL database - ng.asp-net-forum ... crud generator for sql server/vb · daab 3.1 to access oracle · database db = databasefactory.createdatabase(); throws an exception. ...






what's best to use for an installer

difference between server.createobject and createobject

required field validator

how to create directory listing and show link

extracting text from xml

delete user

how can i work around this nullreferenceexception error?

how do i get emitted html for any htmlcontrol

asp.net database question

how to access button which is in library

list(of string)

i'm interested in making a php game in aspx

tiff viewer control in asp.net - [email protected]

how to work in unison with infopath 2003

starting out with asp.net 2.0

search button + enter

how to declare inner class in vb.net

what is the use of actio attribute of <form> tag in a web form?

trace, debug, and customexception : applicationexception

including a javascript

base class reference

understanding repeaters

cf.net

how to get "this.handle.toint32" value in windows to asp.net c# value.

is this possible

how do you edit webpages?

iframe question

ivr

directoryservices.accountmanagement query forest.

current time

   
  Privacy | Contact Us
All Times Are GMT