Sqlserver compilation error when calling a function

  • Good evenig

    Im designing a script that performs a couple of tasks, ie makes a query statemente agains a database.

    In the script specifically named script1.vbs it calls a function and works fine in wsh but the same script code i put in activex object within a DTS and yields with the following error:

    Error Source Microsoft VbScript Compilation error:

    Syntax error

    This is part ofthe code afterdeclaring or domensioning the variables:

    anytime=Type_datex

    set filesys=CreateObject("Scripting.FilesystemObject")

    set demofolder = filesys.GetFolder("\\bogccswbavaria\Documentos\Pablo")

    set folcol= demofolder.subfolders

    for each subfol in folcol

    folist= subfol.name

    MsgBox(folist)

    select case folist

    case "mailbox"

    'MsgBox("This is the mailbox folder")

    'Generar_listado

    case "temp"

    'MsgBox("This is the temp folder")

    'Generar_listado

    End select

    next

    Function Type_datex

    do

    v_fecha=InputBox("Digite fecha: ")

    if isdate (v_fecha) then

    fecha=cstr(v_fecha)

    fecha=replace(fecha,"/","")

    end if

    loop until isdate(v_fecha)

    Ingresar_fecha = v_fecha

    End Function

    Id appreciate so much your help

    txt.close

    set filesys=Nothing

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply