Variable not defined error in Classic ASP (VBScript)
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'product_id'
/Vital/form/products.asp, line 64
I am using option explicit and I have defined the variable as
Dim product_id
product_id=Request.Form开发者_JS百科("product_id")
Is this a problem with IIS or sql server 2003? Actually its working fine when i access my sql server 2008 database from localhost. But the problem comes when my client uploads the asp file to web server and try to access mysql 2003 database.
Without seeing more code, I have to guess and I guess you define the variable inside a function, for example:
Function Foo
Dim product_id
'......
End Function
Then having the line product_id=Request.Form("product_id")
outside the function will indeed result in error, as it's only local to that function.
It got nothing to do with IIS or database - pure VBScript issue.
精彩评论