Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
First off, im new to asp. I inherited a website and im trying to create a simple script to add 50 to the money column in a table called VSPlayers where the user name (a varaiable) such as shaun. I have created vote.asp.
The tableVSPlayers
Username Money
---------------------------
shaun 2834
So I type htt//mydomain.com/vote.asp?usrnm=shaun"
The errorMicrosoft VBScript runtime error '800a01a8'
Object required: 'Conn'
/vote.asp, line 2
This is what I have for code so far.
SQL="Update VSPlayers SET [Money] = [money] + 50 WHERE Username =" & Request.QueryString("usrnm") & "'"
Conn.Execute(SQL)I tried to peace this code together from what I found on google. I know im missing something because this seems too easy for it to be so short. Any help would be GREATLY appreciated !!!!!

I haven't worked in vbscript for several years, but the problem is that you have not created a connection to the database. That code assumes you have created a connection to the database under the object "Conn".
"How" you connet to the databse will depend upon the type of database you are using, it's location (relative to the ASP server), and login credentials.
Here is one example: http://www.aspwebpro.com/tutorials/...
Michael J

I would suggest posting your code over at programminghelp.com. I bet they can help you figure it out. Good Luck!

![]() |
Executing Perl In Easy PH...
|
test web not working with...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |