jeba
Mar 12th, 2004, 10:14 AM
Hi there!
Please clear my doubt.
I have the following code:
Sub MainProc()
open connection
SqlTrans=cn.begintrans(isolationlevel)
'Use MS data access block
SQLHelper.ExecuteNonQuery(SqlTrans,commandtype.storedprocedure,spname,myParameters)
call ChildProc(SqlTrans)
'exception handling here
'if exception then rollback
'else
'commit
End sub
'My doubt is on the following line: whether to use ByVal or ByRef
Sub ChildProc(ByVal TransObj as SqlTransaction)
'Use MS data access block here also
SQLHelper.ExecuteNonQuery(TransObj,commandtype.storedprocedure,spname,myParameters)
'Throw exception if any
End sub
Please clear my doubt.
I have the following code:
Sub MainProc()
open connection
SqlTrans=cn.begintrans(isolationlevel)
'Use MS data access block
SQLHelper.ExecuteNonQuery(SqlTrans,commandtype.storedprocedure,spname,myParameters)
call ChildProc(SqlTrans)
'exception handling here
'if exception then rollback
'else
'commit
End sub
'My doubt is on the following line: whether to use ByVal or ByRef
Sub ChildProc(ByVal TransObj as SqlTransaction)
'Use MS data access block here also
SQLHelper.ExecuteNonQuery(TransObj,commandtype.storedprocedure,spname,myParameters)
'Throw exception if any
End sub