Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
WB 2003h, Office XP, XPPro.
AccessConn = StrCat('Provider=MicroSoft.Jet.OLEDB.4.0; Data Source="', DataBaseFile, '";') AccessDB = ObjectOpen('ADODB.Connection') AccessDB.open(AccessConn) rsCount = ObjectOpen('ADODB.RecordSet') rsCount.CursorLocation = adUseServer rsCount.CursorType = adOpenDynamic rsCount.LockType = adLockOptimistic rsSSN = ObjectOpen('ADODB.RecordSet') rsSSN.CursorLocation = adUseServer rsSSN.CursorType = adOpenDynamic rsSSN.LockType = adLockOptimistic CountQuery = "SELECT SSN FROM Eligible WHERE EmplID = '" SSNQuery = "SELECT prsn_soc_sec_nbr FROM dss.pse_emplid_map_gt WHERE prsn_univ_id = '" SSNQuerySql = StrCat(SSNQuery, EmplID, "'") rsSSN.Open(SSNQuerySQL, OracleConn) fSSN = rsSSN.Fields('prsn_soc_sec_nbr') SSN = fSSN.Value rsSSN.Close ;close the SSN Query ;See if he's in the db already CountQuerySQL = StrCat(CountQuery, EmplID, "'") rsCount.Open(CountQuerySQL, AccessConn) ssncount = rsCount.Fields('ssn') ;I do get the desired value for SSN here in X x = ssncount.value ;but Count comes out -1 every time! Count = rsCount.RecordCount If Count > 0 ;he is, so update the record
RS.Movelast() RS.MoveFirst() ..then x= RS.RecordCountto insure the entire Recordset is loaded, or just use a forward-only cursor.
Article ID: W16083
File Created: 2004:03:30:15:42:46
Last Updated: 2004:03:30:15:42:46