StrataFrame Forum

Temporary Table

http://forum.strataframe.net/Topic230.aspx

By Scott - 12/3/2005

I love the way the business objects work.  I have a need for a temp table.  Is there anyway to create a temp table and access this table with a StrataFrame BO?
By Trent L. Taylor - 12/3/2005

Scott,

You can use a Get method rather than a Fill method.  There are two methods that we use.  The first is a Fill.  A Fill updates the contents of a business object.  The other is a Get, which just returns a DataTable, or like you were asking, a temp table. 

There are two instrisic methods to a business object, GetDataTable and FillDataTable.  The Get method will just return a DataTable, the Fill will updates the contents of the business object.  However, each of these has two overloads which allows you to pass a string command (raw SELECT statement) or an SqlCommand.

I hope this helps.

By StrataFrame Team - 12/4/2005

Yes, Scott, you can also interact directly with the database through the ExecuteNonQuery methods on the business objects. You can create a new temp table by passing the CREATE command through the ExecuteNonQuery of a business object. Then you will use the business object whose structure matches that of the temp table to interact with the temporary table. When you're done with the temp table, you can pass your DROP command through the ExecuteNonQuery method as well.
By Scott - 12/4/2005

Thanks for the info.  I was start working on this Monday.

Scott