Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 About VBScript's Execute Statement in asp

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-08 : 08:46:12
Kai writes "Hi,
I'm having trouble using the Execute Statement.
The syntax should just be Execute(str) where str is a string that's a statement.
My code is:
str="set rs=conn.execute('select * from users where
username=1')"
Execute(str)

conn is a predefined database connection which i'm sure is error-prove.
But it's not working. I've already checked the server VBscript engine version number, it's 5.2.
Would you please give me a helping hand? thanx.

Kai."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-08 : 09:19:13
Um, why not just do this:

set rs=conn.execute("select * from users where username=1")

There's no benefit in wrapping it into another string just to use the VB Execute method on it.

Also, you need to update your VB scripting engine to at least version 5.5. There were a number of enhancements and bug fixes with that version, it may solve this particular problem for you.

Go to Top of Page
   

- Advertisement -