![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello NG, I'm new in DTS and hope you can help me. I'm loop through a recordset in the VB-Script and I want to call a function there. I defined a function with parameters and that's the problem: Why can't I set parameters to new functions?? The error occurs at "Private Function PauseSumme(pnTerminalbuchungnr as Integer) As String"! Here's the code: ---------------------------------------- Function Main() Dim con set con = CreateObject("ADODB.Connection") con.Open = "Provider=SQLOLEDB.1;Data Source=(local);Initial Catalog=diTime;user id = 'sa';password='disoft'" strSQL = "SELECT * FROM zztblTerminalBuchung " set rsTerminal = CreateObject("ADODB.RecordSet") rsTerminal.LockType = 3 rsTerminal.Open strSQL, con, , ,1 ........ Do While (NOT rsTerminal.EOF) Select Case rsTerminal("TERMINALBUCHUNG_CODE") Case "AR" .......................... strResult = PauseSumme rsTerminal("TERMINALBUCHUNG_NR") End Select If Not rsTerminal.EOF Then rsTerminal.MoveNext End If Loop End Function ' THE ERROR OCCURS HERE!!!! Private Function PauseSumme(pnTerminalbuchungnr) As String Dim strSQL strSQL = "SELECT * FROM tblTerminalbuchungPause " strSQL = strSQL & " WHERE TERMINALBUCHUNGPAUSE_TERMINALBUCHUNG_NR = " & pnTerminalbuchungnr set rsPause = CreateObject("ADODB.Recordset") rsPause.LockType = 3 rsPause.Open strSQL, con, , , 1 If rsPause.EOF Then PauseSumme = "00:00" Else PauseSumme = rsPause("PAUSE") End IF rsPause.Close set rsPause = Nothing End Function ----------------------------------------- I hope you can help me. Thanks in advance Daniela Menneweger |
![]() |
| Thread Tools | |
| Display Modes | |
| |