Here's my problem:
I'm calling a Mid() function, here's my code:
temp1 = Mid(Rs("dt2"
,11,2)
Where Rs("dt2"
is a date coming from a database (through a ResultSet). This code executes CORRECTLY.
Now, I don't want 11 as my second parameter. I want a VARIABLE because the position within the string changes. If I replace the 11 with "firstColon," an Integer which is always in the correct range, I get the following error:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'Mid'
I've replaced the 11 with a variable which is ALWAYS between 11-13. If I leave a hard-coded number in, it works fine. Here's the REAL kicker: If I put an assignment statement for firstColon above it, such as "firstColon = 12", it STILL works fine. It's just when firstColon is a variable that it doesn't work. But I'm having it print ALL instances of firstColon with a Response.Write, and they're ALL correct and within range. Any help????
I'm calling a Mid() function, here's my code:
temp1 = Mid(Rs("dt2"
Where Rs("dt2"
Now, I don't want 11 as my second parameter. I want a VARIABLE because the position within the string changes. If I replace the 11 with "firstColon," an Integer which is always in the correct range, I get the following error:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'Mid'
I've replaced the 11 with a variable which is ALWAYS between 11-13. If I leave a hard-coded number in, it works fine. Here's the REAL kicker: If I put an assignment statement for firstColon above it, such as "firstColon = 12", it STILL works fine. It's just when firstColon is a variable that it doesn't work. But I'm having it print ALL instances of firstColon with a Response.Write, and they're ALL correct and within range. Any help????