Evening, all.

I've been lurking on the edges of this board for a few months now - so some rather belated thanks are due to Shawn, Bryce, CJ and others. Cheers!

My first post has been occasioned by trying to get my head around COM/OLE with Kix2001 - I can see its caused others some stress as well , so I figured you were the guys to turn to.

I'm basically trying to write logon info to an Access 2000 database. There are two separate tables, one for user-related info, and one for machine-related. Based on Shawn's code earlier in this thread, I'm simply executing two SQL statements like this:

code:
 $SQL1 = "INSERT INTO TBL_USERS (USERNAME,FULLNAME,WORKSTATION,PRIVILEGELEVEL,HOMEDRIVE,LASTUPDATE) VALUES ('@USERID','@FULLNAME','@WKSTA','@PRIV','@HOMESHR','@DATE @TIME');"
$SQL2 = "INSERT INTO TBL_COMPUTERS (WORKSTATION,DOMAIN,IPADDRESS,MACADDRESS,OS,LOGGEDONUSER,LASTUPDATE) VALUES ('@WKSTA','@DOMAIN','@IPADDRESS0','@ADDRESS','@PRODUCTTYPE','@USERID','@DATE @TIME');"

Now the first statement works fine. However the second produces the following error:

Error: COM exception error "Execute" (Microsoft JET Database Engine - Syntax error in INSERT INTO statement.) [1/1]

I've been banging my head against this for a couple of hours now, so any advice would be appreciated.

Thanks in advance,

_________________________
================================================
Breaker