I have a vbscript which takes a csv file and uploads its content to the database. I need to include that script in an ASP page. the script should be present in the asp page itself and not placed externally, ie, i dont want the asp page to set a reference to the externally located dll but include the code in the asp itself. can it be done?
this is the vbscript I have.
Any help will be genuinely appreciated.
Most of the vb6 code can just be reused in classic asp vbscript. You’ll have to declare your variables a bit different as vbscript only has Variants..
Thus for the recordset declaration, instead of this:
You’ll have to do this
[I didn’t see any connection object in your code example.. just the use of db.ConnectionString.. Make sure you create the connection object db also with the same logic.]
For the simple variables you also just create a high-level variant-type and the subtypes (string, long, integer…) will be assigned at runtime by assigning values to the variables.
Thus, instead of this:
You can do this: