Thanks for your post! I greatly appreciate your assistance.
I guess I'm used to VB and how it prompts you for available options, if any were available, after I would type in "recordset." Like recordset.count, recordset.eof, etc, etc.
I'm working with Kixtart in notepad. Is another tool available? As you can obviously tell, I'm new to this.
I do have a few more code questions though...
With the below code, if my Access DB is empty, it will insert a record.
On the next run of this code (when I logoff/logon) I get a Scriptlogic error message about the execution of this script.
I don't understand why it doesn't work. If the recordset is not empty, I would expect it to go to the ELSE statement and send me a messagebox. Do I need to do some sort of other check?
Code:
$objConn = DBConnOpen('DRIVER={Microsoft Access Driver (*.mdb)}; UID=; PWD=; DBQ=\\ngne-j6-05\test\erictest.mdb')
$recordset = DBGetRecordset($objConn,"SELECT MAC FROM Table1 WHERE MAC='$MACADDR'")
$=Messagebox("TEST 1"," ")
If $recordset=''
; This means that there is no record in the table that contains this MAC. Insert record now....
$=Messagebox("TEST 2"," ")
$retcode = DBExecuteSQL($objConn,"INSERT INTO Table1(DateWritten,TimeWritten,Workstation,IP,MAC,Cpu,RAM,OS,ServicePack,IEVER,MSOfficeVer,UserID,FullName) VALUES('$DATEWRITTEN','$TIMEWRITTEN','$WKSTA','$IPADDRESS','$MACADDR','$CPUMHZ','$RAM','$VerboseOs','$OSCSDVersion','$IeCurVer','$OfficeCurVer','$UserID','($FullName)')")
Else
$=Messagebox("TEST 3"," ")
EndIf
$retcode = DBConnClose($objConn)