Stored Procedure Example


Author
Message
Mike Rogers
Mike Rogers
StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)
Group: Forum Members
Posts: 23, Visits: 723
Hi

I am looking for a sample program that uses stored procedures,  Save, New, Delete, FindAll, FindByName

Or some good documentation on how to do this.

Thanks it would be greatly appreciated.

Mike

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The StrataFlix sample shows every bit of this.  The StrataFlix sample shows how to populate using sprocs, edit, save, etc.  It also takes the approach of not using sprocs as well in certain programs this way there is a good mix of examples.

In the StrataFlix sample, there is a shared function called PeopleMaintenance_AllData in teh ApplicationQueries class in the Business assembly that shows how to define a sproc and setup parms.  This method is used for a report to populate multiple business objects using the FillMultipleDataTables command.

Also, if you would try a search here on the forum you will find a lot of code and posts regarding sprocs.  Finally, you can find more information in the docs including the FillByStoredProcedure method on the BO.

Also, in short, you can easily execute a sproc within a BO like this:

Dim cmd As New SqlCommand("MyStoredProc")

cmd.Parameters.Add("@parm1", SqlDbType.bigInt).Value = MyValue

cmd.CommandType = StoredProcedure

Me.FillDataTable(cmd)



You can also call ExecuteNonQuery, ExecuteScalar, or GetDataTable if you do not want to populate the BO and are just looking for records, etc.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search