Is there a tool that can automatically generate stored procedures (select, insert, update and delete) for all tables in a database? I'm working with Sql Server 2005.
Update: See last post for details.
-
-
No, but you could write your own

I'd love to see a program that looked at my classes and created tables based on them, as well as stored procedures to boot, that would save a LOT of dev-time. -
I think you would better start with the tables, that way you can make sure you have the right relationships, primary keys and indexes defined.
-
W3bbo wrote:No, but you could write your own

I'd love to see a program that looked at my classes and created tables based on them, as well as stored procedures to boot, that would save a LOT of dev-time.
Cayenne does that on Java. Except backwards: you define it as tables and it makes up the classes, which you can then modify and extend. It generates the SQL to make the tables, though.
-
I user CodeSmith Freeware to do it: http://www.codesmithtools.com/freeware.aspx
-
ZippyV wrote:Is there a tool that can automatically generate stored procedures (select, insert, update and delete) for all tables in a database? I'm working with Sql Server 2005.
Actually what's wrong with Management Studio? It's there. Kind of.
Right click on the table and go to the Script Table As menu. OK, there's no stored procedure wrapper around it, but it's a start.
-
This tool can generate stored procedures and much more (you can write your own templates). I've used it for a few years now.
http://www.mygenerationsoftware.com/ -
An enthusiastic "second" for mygeneration, as well as dOOdads, Mike Griffin's amazing object-relational mapping framework. I use both extensively with SQL Server and VS.NET 2005.
-
Well, Lattice's SPGen does a really good job at generating storeprocs http://www.latticesoft.com/DesktopDefault.aspx?showLogin=N + they also have a O/R mapper. Give it a try, saves a lot of time!
-
kenfine wrote:An enthusiastic "second" for mygeneration, as well as dOOdads, Mike Griffin's amazing object-relational mapping framework. I use both extensively with SQL Server and VS.NET 2005.
Forgot to mention that it is completely free (not open source) and can generate code for several frameworks (dOOads, Gentle.NET, NHibernate, DAAB, DotNetNuke) and supports several databases (SQL Server, Access, MySQL, Oracle, PostfreSQL to name just a few).
-
dvanatta wrote:I user CodeSmith Freeware to do it: http://www.codesmithtools.com/freeware.aspx
Same here, but I use the Pro version. -
casts +5 spell of Raising the Dead
This thread actually came up first on my google search. Does any one have any other tools besides the ones mentioned above? -
i really like ActiveRecord and i really really want something like that for .NET
-
I've written my own, but it's currently at the level of "tools that only I can use" and isn't likely to improve much in the foreseeable future (especially since I'll probably switch to LINQ to SQL once .Net 3.5 comes around).
-
Ion Todirel wrote:i really like ActiveRecord and i really really want something like that for .NET
Have you looked at Subsonic? http://www.codeplex.com/subsonic -
yes and CastleJChung2006 wrote:
Ion Todirel wrote:
i really like ActiveRecord and i really really want something like that for .NET
Have you looked at Subsonic? http://www.codeplex.com/subsonic
-
Ion Todirel wrote:
yes and Castle
JChung2006 wrote:

Ion Todirel wrote:
i really like ActiveRecord and i really really want something like that for .NET
Have you looked at Subsonic? http://www.codeplex.com/subsonic
Did you not like them? Or are you waiting for Microsoft to implement ActiveRecord in the framework itself? Or something else? -
LINQ to SQL does the reverse. Given a database make objects. You can associate storeproces to the DataContext (which manages Data Access) if you really need storeprocs perf in a given instance. (This is me avoiding the religious argument)
I think any new .NET development from Beta 2 on should consider LINQ especially if you can't throw liscensing money at the issue. My experience with ORMs have always been luke warm to this is totally unuseable to in most cause heres a nightmare waiting to happen.
Subsonic is an example of a nightmare. Anything that uses strings to access Queries is totally unusuable in my opinion. Strong typing of queries is an absolute requirement.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.