Sorry if this e-mail is rather long but I want to give all code I am using
as to make sure that everyone has all the information they need.

Machine info:
MySQL for Win 2000
IIS5

The Table:

CREATE TABLE Players (
pid INT AUTO_INCREMENT NOT NULL,
RealFullName CHAR(70) NOT NULL,
RealAge INT NOT NULL,
EMAIL CHAR(50) NOT NULL,
Login CHAR(50) NOT NULL,
Password CHAR(50) NOT NULL,
UserLevel TINYINT NOT NULL,
lastip CHAR(20) NOT NULL,
lastlogindate DATE NOT NULL,
lastlogintime TIME NOT NULL,
rank INT NOT NULL,
turns INT NOT NULL,
money BIGINT NOT NULL,
commission INT NOT NULL,
bodyguards INT NOT NULL,
associates INT NOT NULL,
soldiers INT NOT NULL,
captains INT NOT NULL,
hitmen INT NOT NULL,
glocks INT NOT NULL,
shotguns INT NOT NULL,
mguns INT NOT NULL,
srifles INT NOT NULL,
food INT NOT NULL,
fid INT NOT NULL,
Voted TINYINT NOT NULL,
Frozen TINYINT NOT NULL,
Squelched TINYINT NOT NULL,
PRIMARY KEY (pid),
UNIQUE (Login),
UNIQUE (EMail)
);

The ASP Code:

   set dbs = CreateObject ("ADODB.Connection")
   dbs.Open "gamedb"
   Set rs = Server.CreateObject("ADODB.Recordset")
   rs.open "SELECT * FROM Players", dbs, 3,3
        rs.addnew
        rs("pid") = lastpid + 1
        rs("RealFullName") = request.form("FullName")
        rs("RealAge") = request.form("RealAge")
        rs("EMail") = request.form("EMail")
        rs("Login") = request.form("usrname")
        rs("Password") = request.form("usrpassword")
        rs("UserLevel") =       1
        session.contents("UserLevel") = 1
        if request.form("usrname") = "Kewlb" or _
           request.form("usrname") = "Strike" then
            rs("UserLevel") = 5
                session.contents("UserLevel") = 5
        end if
        rs("LastIP") = Request.ServerVariables("REMOTE_ADDR")
        rs("LastLoginDate") = date
        rs("LastLoginTime") = time
        rs("rank") = 0
        rs("turns") = 355
        rs("money") = 7500
        rs("commission") = 10
        rs("bodyguards") = 5
        rs("associates") = 0
        rs("soldiers") = 0
        rs("captains") = 0
        rs("hitmen") = 0
        rs("glocks") = 0
        rs("shotguns") = 0
        rs("mguns") = 0
        rs("srifles") = 0
        rs("food") = 500
        rs("fid") = 0
        rs("voted") = 0
        rs("frozen") = 0
        rs("Squelched") = 0
        session.contents("LoggedIn") = true
        rs.update
        dbs.close

ASP ERROR:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.
/mafiastar/doregister.asp, line 53

if I try to manually (via mysqlgui) add a new record I get the following:

column count doesn't match value count


Any help would be great, once again sorry for the really long e-mail



Brian Clark - A+, Net+, CCA, MCP, CCNA
Systems Anyalsis
Expanets Direct


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to