vbscript "overflow" error
liza | Posted 2:10pm 12. May 2008 Server Time |
Hi,
I'm trying to pass an update statement to oracle which includes two variables. I'm using CInt for both but keep getting an "overflow" message. Tried Clng but got an "invalid character" error. If I hardcode the values then I get no errors and script works.
Dim PID, SID
PID = 101
SID = 606548
cmdString = "UPDATE schema.table SET col1 = null, col2 = null, col3 = '" & CInt(PID) & _
"' ,col4 = null, col5= null, col6 = null, col7 = null, col8= null, col9= null, col10 = null, col11 = null " & _
" where SID = '" & CInt(SID) & "';"
Would appreciate anyone's input.
Liza |
katy8439 | Posted 3:29am 13. May 2008 Server Time |
I'm not sure about oracle not having used it but in MSSQL you don't need the single quotes around your variable if it's numeric...
liza | Posted 6:50am 13. May 2008 Server Time |
Hi
I tried with and without quotes but still got the overflow message. I removed the quotes and changed the SID to be CLng(SID) and kept the other one CInt(PID). Now I'm getting an "ORA-00911: Invalid Character". Its definitely attempting to update but Oracle but Oracle doesn't like the variables.
When I run the update command as a mini stored procedure directly in Oracle, still passing it variables, Oracle does do the update.
Thanks,
Liza
Reply to Post vbscript "overflow" error
|
|
|