around this issue I'm trying to call a stored procedure using jdbc. My connection is being passed through namedParameterJdbcTemplate and that's what I have to use to call it, but when I attempt to do this: , This is how it works:
around this issue Mapping to LINQ2SQL has a serious advantage in being type-safe - you don't really have to worry about parsing the results or adding command parameters. It does it all for you. On the other hand with calling stored procedures directly with SQLcommand and DataReader proves to have better performance (especially when reading/changing a lot of data).
Call stored procedures from another stored procedure or only one SP for better efficiency?
To fix this issue Assuming that you are updating 9 tables in one action like(button click),maintaining transaction may be your requirement ,so i would like to suggest you to make one storedprocedures and maintain transaction in it,rather than 9 different procedures..
How to call Stored Procedures (with 2 parameters) in a Stored Procedure?
hope this fix your issue I see two issues here: Your procedure apparently takes two parameters, @myDate and @ServerName, which you have not declared yet. Do so by adding the names and the types between the procedure name and AS.
CREATE PROCEDURE [dbo].[SP_All]
exec sp_1 @myDate, @ServerName
exec sp_2 @myDate, @ServerName
exec sp_3 @myDate, @ServerName
exec sp_4 @myDate, @ServerName
VB.NET: How to call another stored procedures based on stored procedure result and display all results?
this will help This would be an ideal candidate for using the Repeater Class. You can nest them to handle your logic of displaying data based on an initial DataSource. Since I do not know your Model definition, I have used generic placeholders that you will need to replace in the example code. Examples of these placeholders include "SomeFieldFromSp2DataTable", "FieldNameOfId", "TheClassOfItemsInYourArrayList", etc. First, make the markup in the ASPX page. The HeaderTemplate contains markup to use for the header of a DataSource. The ItemTemplate is the markup for the body of each item in your DataSource. FooterTemplate does markup at the end of a DataSource. In this instance I mocked it up so it would create nested HTML Tables.
Private Sub rptSP1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptSP1.ItemDataBound
'Perform this check because you only need the actual data items.
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
Dim intIdFromSp1 As Integer = CType(e.Item.DataItem, TheClassOfItemsInYourArrayList).IdField
Dim rptSP2 As Repeater = CType(e.Item.FindControl("rptSP2"), Repeater)
Dim rptSP3 As Repeater = CType(e.Item.FindControl("rptSP3"), Repeater)
'Code that gets the data from the other SPs would be in a Function called GetDataTableFromSP2.
rptSP2.DataSource = GetDataTableFromSP2(intIdFromSp1)
rptSP3.DataSource = GetDataTableFromSP3(intIdFromSp1)
Is it correct to use SET NOCOUNT ON only in the root stored procedure in case you want to call other stored procedures i
Hope this helps SET NOCOUNT ON will prevent row count messages from being sent by the stored procedure, or by any nested stored procedures (or dynamic batches). If a nested procedure or batch sets NOCOUNT OFF, row count messages will be sent for the statements in that batch, but the NOCOUNT OFF behavior will be restored when control returns to the outer proc/batch.