Thanks to some very easy to use UDFs by Sealeopard, I am able to extract the data I need to run my script with no problems. The code below only displays each record in the record set.
code:
break on
$objConn = DBConnOpen('DRIVER={Microsoft Access Driver (*.mdb)}; UID=; PWD=; DBQ=f:\nes.mdb')
$recordset = DBGetRecordset($objConn,'SELECT Staff.[First Name Initial], Staff.[Last Name],' +
' Staff.[SocialSecurity#], Staff.DOB, Managers.[Department Director],' +
' Staff.[Dept#], Managers.[Department Name], Positions.[Position Title],' +
' Staff.[3/4ID] FROM (Staff INNER JOIN Managers ON Staff.[Dept#]' +
' = Managers.[Dept#]) INNER JOIN Positions ON Staff.[Position#] =' +
' Positions.[Position#] WHERE (((Staff.[SocialSecurity#]) Is Not Null)' +
' AND ((Staff.DOB) Is Not Null) AND ((Staff.[3/4ID]) Is Null) AND' +
' ((Staff.OSHA) Is Not Null)) ORDER BY Staff.[Last Name];')
$colFirstNameInits=0
$colLastNames=1
$colSSNs=2
$colDOBs=3
$colDeptManagers=4
$colDeptNums=5
$colDeptNames=6
$colPositionTitles=7
$col34IDs=8
for $row=0 to ubound($recordset,1)
? "First Name Initial : " + $recordset[$row,$colFirstNameInits]
? "Last Name : " + $recordset[$row,$colLastNames]
? "SSN : " + $recordset[$row,$colSSNs]
? "DOB : " + $recordset[$row,$colDOBs]
? "Dept Manager : " + $recordset[$row,$colDeptManagers]
? "Dept Number : " + $recordset[$row,$colDeptNums]
? "Dept Name : " + $recordset[$row,$colDeptNames]
? "Position Title : " + $recordset[$row,$colPositionTitles]
? "3/4 ID : " + $recordset[$row,$col34IDs]
? "_____________________________________________________________"
next
? @error +":"+ @serror
$retcode = DBConnClose($objConn)
Potentially, once all the data above is entered into the website, the website would return a 3/4ID for each record. I need to update the 3/4ID field in the database for each corresponding record in the recordset. How might I go about doing that?
[ 17. May 2003, 01:23: Message edited by: Al_Po ]