I have a custom application that is written in Classic ASP with a SQL 2005 database, so I can't convert it to ASP.net at this time.
What is the proper method to upload a file, import it into SQL, then process the upload?
I have a few processes in place an each one seems to have some erratic errors. The process that I've been using is
To upload biographical list of people:
1) Use ASPUpload to upload the file to the webserver
2) User CreateObject("Scripting.Fi
leSystemOb
ject") to open the file and examine it line by line. Each line is checked for varchar in place of int, if success, insert the line into the table tblTEMPBiographical, if error store the line # in a variable.
3) Reported success and error numbers, alone with the error line# and reason why it was invalid
4) Use Set rs = dc.Execute(dSQL) where dSQL = "spAdminBiographicalProces
s". This SP selects all the IDs and Names and inserts it to tblTempName, then selects all the IDs and Addresses and inserts them into tblTempAddress
5) Use Set rs = dc.Execute(dSQL) where dSQL = "spAdminBiographicalTransf
er". This SP deletes the live tblName and inserts all data from tblTempNames to tblName, then it does the same process for Address: tblTempAddess to tblAddress
I seem to be having issues around step 4 where it will timeout on me and move to step 5 because both SP's are called in ASP (shown below).
I know this example is rather simple, but is it the correct way do to this? Am I completely off track here?
ConnectDatabase dc
ConnectRecordset rs
dSQL = "spAdminBiographicalProces
s"
Set rs = dc.Execute(dSQL)
dSQL = "spAdminBiographicalTransf
er"
Set rs = dc.Execute(dSQL)
Set rs = Nothing
Set dc = Nothing
Please help!
Thank you
Start Free Trial