Hi Below is my code of ASPClassic, in which csvData is a very large string containing variable.Now in this At line where Mid function is call error ‘Invalid Procedure Call or argument : Mid’ occur why this happens…
Dim dataLen
Dim fromLen
Dim toLen
Dim slab
Dim totalPass
dataLen =len(csvData)
fromLen =0
toLen =100000
slab =100000
totalPass =(dataLen/slab)
if (dataLen Mod slab)>0 then
totalPass=totalPass+1
end if
Dim i
For i = 0 To dataLen
i=toLen
if toLen > dataLen then
toLen=dataLen
end if
Response.Write Mid(csvData,fromLen,toLen)
fromLen=toLen
toLen=toLen+slab
Next
I think that your fromLen is 0, when you call Mid() for the first time:
Try to initialize with: