﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Application Framework / Enhancement Requests  / Class for calling Stored Procedures... / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Thu, 20 Nov 2008 02:14:13 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>I'm anxious to hear about those new features. Hope I dont have to wait TOO long! :hehe::P</description><pubDate>Tue, 31 Jul 2007 11:59:29 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>I could see the benefit of this class being created.  And this may be something that we consider in the next major release of StrataFrame.  Obviously the more things like this that can be done for the developer the stronger the framework becomes.  So I can see your point.  But as for a short term forecast, I do not see this being integrated into the framework.  The next major release of SF will have even more tools to help in app development, some of which may be code generation tools like this.</description><pubDate>Tue, 31 Jul 2007 10:45:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>Trent? Ben? Hello? &lt;br&gt;&lt;br&gt;I really appreciate Greg's advice, but I'm puzzled that I havent heard from you guys.</description><pubDate>Tue, 31 Jul 2007 10:18:42 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>Mike,&lt;br&gt;&lt;br&gt;Yep, it's pretty deep. There are three features that might be of great help:&lt;br&gt;&lt;br&gt;- This is just .net.  I.e. you can do pretty much what ever you can do with .net within this generator.&lt;br&gt;&lt;br&gt;- Note you can define properties that are string arrays. This could be helpful if you need to generate code for a subset of sprocs (took me a while to figure this out).  &lt;br&gt;&lt;br&gt;- You can use xml files to control the generation, including using an xsd file to define the schema. This can be helpful if the generation requires some really complex input data.  &lt;br&gt;&lt;br&gt;- There is a SchemaExplorer that allows you to "reflect" into a database, using the schema of tables, getting lists of sprocs, etc.  &lt;br&gt;&lt;br&gt;- If you get the professional version, you can use this to build a sproc for a table and build code to access the sproc, at the same time. If you get standard edition, you would need two templates.&lt;br&gt;&lt;br&gt;See [url]http://www.codesmithtools.com/usersguide/[/url], the Basic Syntax section to get an idea of how to get things done, then see "Driving Templates with Metadata", especially the "Using SchemaExplorer". &lt;br&gt;&lt;br&gt;There support is pretty good. The developer is fairly available. Not as good as SF, but better than most. In fact somebody has posted a question that is very similar to yours :D : &lt;br&gt;&lt;br&gt;[url]http://community.codesmithtools.com/forums/t/6935.aspx[/url]&lt;br&gt;&lt;br&gt;</description><pubDate>Thu, 19 Jul 2007 11:19:19 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>Hey Greg, Thanks for the reply. I've downloaded an installed a demo of CodeSmith, the only problem is that is a pretty robust product and I haven't the time to sit down with it an fully evaluate it.&lt;br&gt;&lt;br&gt;Would you be able to point me in the direction as to how to generate the class I mentioned above using CodeSmith?&lt;br&gt;&lt;br&gt;Also, if its not too much trouble :hehe:, is there anything about this program that you really like you think I should look at? It's not too expensive so if it offers me a few features that I find useful it would be worth it to me.&lt;br&gt;&lt;br&gt;Thanks</description><pubDate>Thu, 19 Jul 2007 08:07:43 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>You might want to check out CodeSmith ([url]http://www.codesmithtools.com[/url]).  It is a code generator that can code against the schema of a database directly. I.e. it could build a class of your liking for each sproc in the database.  You can also use an xml file to define parameters, which allows for some pretty complicated code generation.</description><pubDate>Wed, 18 Jul 2007 15:16:15 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>Class for calling Stored Procedures...</title><link>http://forum.strataframe.net/Topic10399-9-1.aspx</link><description>I think it would be a cool feature if I run a code generator that created a class that I could use to call stored procedures with. And that inside that class it uses StrataFrame's connection to the database, etc. This way I dont have to remember the entire name of the stored procedure nor do i have to remember all the parameters.&lt;br&gt;&lt;br&gt;For Example&lt;br&gt;&lt;br&gt;Public Class DataAccessLayer&lt;br&gt;&lt;br&gt;     Public Shared ConnectionString As String =  System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString") &lt;br&gt; &lt;br&gt; &lt;br&gt;Public Shared Function STIGetDifferentLumberTypes(ByVal @PurchaseOrderID As Integer, ByVal @ProductionID As Integer, ByVal @ReturnID As Integer, ByVal @TransactionID As Integer) As DataView&lt;br&gt;'Retrieve the parameter set&lt;br&gt;Dim storedParams() As SqlParameter =  New SqlParameter(3) {} &lt;br&gt;storedParams = SqlHelperParameterCache.GetSpParameterSet(ConnectionString ,"STIGetDifferentLumberTypes")&lt;br&gt;&lt;br&gt;storedParams(0).Value = @PurchaseOrderID&lt;br&gt;storedParams(1).Value = @ProductionID&lt;br&gt;storedParams(2).Value = @ReturnID&lt;br&gt;storedParams(3).Value = @TransactionID&lt;br&gt;&lt;br&gt;Dim ds As DataSet&lt;br&gt;&lt;br&gt;ds = SqlHelper.ExecuteDataset(ConnectionString,CommandType.StoredProcedure,"STIGetDifferentLumberTypes", storedParams)&lt;br&gt;&lt;br&gt;Return ds.Tables(0).DefaultView&lt;br&gt;End Function&lt;br&gt;&lt;br&gt;End Class&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;</description><pubDate>Wed, 18 Jul 2007 07:24:53 GMT</pubDate><dc:creator>StarkMike</dc:creator></item></channel></rss>