A module is not a valid type
A module is not a valid type
(OP)
Public Sub testingStubForSqlStatement()
Dim strSql As String
Dim oSqlStatement As New SqlStatement
Dim rs As ADODB.Recordset
strSql = "SELECT unitspercase * casesperpallet FROM PRODUCTS WHERE PRODUCTCODE = ?1 " & _
" and messagename = ?2 and labelid = ?3"
With oSqlStatement
.Init strSql
.addParameter "044-10101", eStr
.addParameter "04410101", eStr
.addParameter "1", eInt
Set rs = .getDataSet()
End With
If hasRecords(rs) Then
Do While Not rs.EOF
Debug.Print (rs(0))
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
End Sub
Dim strSql As String
Dim oSqlStatement As New SqlStatement
Dim rs As ADODB.Recordset
strSql = "SELECT unitspercase * casesperpallet FROM PRODUCTS WHERE PRODUCTCODE = ?1 " & _
" and messagename = ?2 and labelid = ?3"
With oSqlStatement
.Init strSql
.addParameter "044-10101", eStr
.addParameter "04410101", eStr
.addParameter "1", eInt
Set rs = .getDataSet()
End With
If hasRecords(rs) Then
Do While Not rs.EOF
Debug.Print (rs(0))
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
End Sub
RE: A module is not a valid type
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
RE: A module is not a valid type
Pleae use TGML Code tags to make your code easier to read.
CODE --> vba
Duane
Hook'D on Access
MS Access MVP