Results 1 to 1 of 1

Thread: Passing ADO.NET transaction ByVal or ByRef?

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265

    Passing ADO.NET transaction ByVal or ByRef?

    Hi there!

    Please clear my doubt.


    I have the following code:

    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
    Last edited by jeba; Mar 16th, 2004 at 01:14 AM.
    J£ßä

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width