PDA

View Full Version : VB as VBScript in ASP


neil121183
04-21-2005, 03:39 PM
Hi everyone, I'm new to this forum and I would be very greatful if someone could answer this question.

I have some VB code produced from a Microsoft Access Macro.
The macro uses the VB function - 'TransferText' which imports information from a textfile into a table of my choice.

I was just wondering if it was possible to re-write this code in VBScript instead of VB and run it from ASP?

The code is below.....

Option Compare Database

'------------------------------------------------------------
' Import
'
'------------------------------------------------------------
Function Import()
On Error GoTo Import_Err

' Import from excel spreadsheet into a table
DoCmd.TransferText acImportDelim, "Table", "Import Specifications", "C:\blahdeblahdeblah.csv", False, "", 1252


Import_Exit:
Exit Function

Import_Err:
MsgBox Error$
Resume Import_Exit

End Function


Thanks