Try
DataBasics.DataSources(
'-- Start the transactionDataBasics.DataSources("").TransactionBegin("MyTrans", Data.IsolationLevel.ReadCommitted)'-- Create the command objectDim cmd As New SqlCommand("STI30PostTempDetailsToPOOrderDetails")cmd.CommandType = Data.CommandType.StoredProcedurecmd.Transaction = CType(DataBasics.DataSources("").Transactions("MyTrans"), SqlTransaction)cmd.Parameters.AddRange(lodefaultParams.ToArray)'-- Execute the commandDataBasics.DataSources("").ExecuteScalar(cmd)'-- Create the command objectcmd = New SqlCommand("STI30DeleteRecordsFromSTItmpPODetails")cmd.CommandType = Data.CommandType.StoredProcedurecmd.Transaction = CType(DataBasics.DataSources("").Transactions("MyTrans"), SqlTransaction)cmd.Parameters.AddRange(lodefaultParams.ToArray)'-- Execute the commandDataBasics.DataSources("").ExecuteScalar(cmd)'-- Commit the transactionDataBasics.DataSources("").TransactionCommit("MyTrans")
'-- Start the transactionDataBasics.DataSources("").TransactionBegin("MyTrans", Data.IsolationLevel.ReadCommitted)'-- Create the command objectDim cmd As New SqlCommand("STI30PostTempDetailsToPOOrderDetails")cmd.CommandType = Data.CommandType.StoredProcedurecmd.Transaction = CType(DataBasics.DataSources("").Transactions("MyTrans"), SqlTransaction)cmd.Connection = CType(DataBasics.DataSources("").Transactions("MyTrans").Connection, SqlConnection)cmd.Parameters.AddRange(lodefaultParams.ToArray)'-- Execute the commandDim returnVal As Object = cmd.ExecuteScalar()'-- Create the command objectcmd = New SqlCommand("STI30DeleteRecordsFromSTItmpPODetails")cmd.CommandType = Data.CommandType.StoredProcedurecmd.Transaction = CType(DataBasics.DataSources("").Transactions("MyTrans"), SqlTransaction)cmd.Connection = CType(DataBasics.DataSources("").Transactions("MyTrans").Connection, SqlConnection)cmd.Parameters.AddRange(lodefaultParams.ToArray)'-- Execute the commandreturnVal = cmd.ExecuteScalar()'-- Commit the transactionDataBasics.DataSources("").TransactionCommit("MyTrans")
Also... Do you think I need any error handling in my stored procedures or user-defined functions to pass back info to my app or will the info get passed back without them?