VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TxNew"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Const m_modName = "FMStocks_DB.TxNew"
Private m_dbh As DBHelper

Private Sub Class_Initialize()
    'must call CreateObject or COM+ will
    'not call IObjectConstructor inferface that DBHelper needs
    Set m_dbh = CreateObject("FMStocks_DB.DBHelper")
End Sub

Private Sub Class_Terminate()
    Set m_dbh = Nothing
End Sub

Public Sub SetTxType(ByVal TxID As Long, ByVal TxTypeId As Long)
    On Error GoTo errorHandler
    
    m_dbh.RunSP "Tx_SetTxType", Array( _
        mp("@TxID", adInteger, 4, TxID), _
        mp("@TxTypeID", adInteger, 4, TxTypeId))
    
    Exit Sub

errorHandler:
    
    RaiseError m_modName, "SetTxType(" & TxID & "," & TxTypeId & ")"
End Sub

