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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Keywords Error

Status
Not open for further replies.

esteiner

Programmer
Oct 31, 2003
24
0
0
This is a question related to archived thread333-991814

The code provided by ChrisHirst was working beautifully the first time I tested it. I used Google.com, MSN.com, Yahoo.com, etc. I also began to test on interational sites like google.de, yahoo.fr, etc.

The search term that I used to test is "YMF289B-S distributor" The page that I am testing is
After a while, I ran into problems with the code. I received the following error:

-------------------------------------------
Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'left'

/ICDY.asp, line 54
-------------------------------------------


Line 54 in my code reads:
"if endpoint <> 0 then temp = left(temp,instr(temp,"&") - 1)"

This error seems to pop up after the code works successfully two or three times. My best guess is that this is some sort of cache problem on the server?!?

I would appreciate any solutions or suggestions. Let me know if you need any additional information. I am obviously not very experienced with ASP so any hand holding would be appreciated.


Thank you,

-Charlie
 
I'd guess the problem is that the second parameter of the LEFT() function is negative because there was no & found by InStr() in the string named temp. Are you using VBScript? Then try this...
Code:
If endpoint <> 0 Then
   If instr(temp,"&") > 0 Then
      temp = left(temp,instr(temp,"&") - 1)
   End If
End If
dbMark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top