Hi All

How do I convert the code below using VBScript .The code works in Access but I want to automate it using a DTS/SSIS.we are curently using SQL2000 and 2005.If I can get an answer on maybe one of them I will be glad.

Function ImportFile()

'change the name of the constant to the report/table imported
Const conINPUTTABLE = "TSM83D"
Const conIMPORTSPECNAME = "TSM83D Import Specification"
Const conPATHTOFILE = "C:\TSM83D.txt"

On Error GoTo errImport

'delete old
DoCmd.DeleteObject acTable, conINPUTTABLE

'import new
DoCmd.TransferText acImportFixed, conIMPORTSPECNAME, conINPUTTABLE, conPATHTOFILE, False, ""
MsgBox "Finished importing file to " & conINPUTTABLE & ".", , "File Imported"

Exit Function

'if old table not found, table does not exist therefore ignore
If Err.Number = 3011 Then
Resume Next 'carry on with the next step
MsgBox Err.Number & " " & Err.Description
Exit Function
End If
End Function