Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String index out of range:6104

Status
Not open for further replies.

gunalan

Technical User
Jun 29, 2004
52
US
hi,

actually my predecessor created a form.it was working properly so far.

some reason one of the user had made a complaint saying it is flashing this error.
Vbscript Runtime error 'ASP 0185 : -1'
String index out of range: 6104
/submitPPSurvey.asp,line 64

i could find proper resources for this...

reason for this error...

could u give me idea about this.....

i have given the line number 64 of my code..


Connection.execute("INSERT INTO PurchaseProposalTable (ReqName, ReqEmail, ReqLibrary, MainEntry, PubSource, VendorURL, NoPieces, Cost, Subject, YrsCov, Descriptions,Reason, Types, FillinComp, Other, DateTime1) VALUES ('" & ReqName & "', '" & ReqEmail & "', '" & ReqLibrary & "', '" & MainEntry & "','" & PubSource & "', '" & VendorURL & "','" & NoPieces & "', '" & Cost & "', '" & Subject & "', '" & YrsCov & "','" & Descriptions & "','" & Reason & "', '" & Request("Types") & "','" & Request("FillinComp") & "','" &Other &"', '" &Now() &"')")


so some where with ms access...is it so?

pls give clear picture about this...

thanks
 
The only way you are going to work out what is causing the problem is to do some troubleshooting.

Take the line and remove the first half of the fields being inserted
Code:
Connection.execute("INSERT INTO PurchaseProposalTable (ReqName, ReqEmail, ReqLibrary, MainEntry, PubSource, VendorURL,    NoPieces, Cost) VALUES ('" & ReqName & "', '" & ReqEmail & "', '" & ReqLibrary & "', '" & MainEntry & "','" & PubSource & "', '" & VendorURL & "','" & NoPieces & "')")
See if that works. If it does, the problem is in the other 1/2 of the values, so try that lot. One of them will break.
When it breaks, split that lot in half, eventually you will end up with the one that is causing the problem - or you may spot it as you get closer.

Steve Davis
hey.you AT HaHaHa.com.au

Me? I can't even spell ASP!

NOTE: This sig does not include any reference to voting, stars, or marking posts as helpful as doing so is cause for membership termination
 
Alternately print out the SQL you're inserting so you can see the problem, a la
Code:
Dim strSQL

strSQL = "INSERT INTO PurchaseProposalTable (ReqName, ReqEmail, ReqLibrary, MainEntry, PubSource, VendorURL,    NoPieces, Cost,    Subject, YrsCov, Descriptions,Reason,     Types,     FillinComp, Other, DateTime1) VALUES ('" & ReqName & "', '" & ReqEmail & "', '" & ReqLibrary & "', '" & MainEntry & "','" & PubSource & "', '" & VendorURL & "','" & NoPieces & "', '" & Cost & "', '" & Subject & "',    '" & YrsCov & "','" & Descriptions & "','" & Reason & "', '" & Request("Types") & "','" & Request("FillinComp") & "','" &Other &"', '" &Now() &"')"

Response.Write(strSQL)
Response.Flush

Connection.Execute(strSQL)
Because your problem seems to be sporadic -- that is, you may not be able to see the error happen yourself -- then you need to logically break down what might be happening.

I've not seen this error before, so I'm not sure what the problem might be. I assume that it's related to one of the strings you're sending. Possible problems include the user typing an apostrophe (single quote) in one of the fields, since the code doesn't seem to check for it (though I don't know where the variables come from). To try to reproduce that error, enter something like
Code:
can't
in one of your text fields and see if it throws the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top