cdmmaui,
in a network environment it is dangerous not to check for neterr().
Here a module i use for append in networks.
example:
- Code: Select all Expand view
#define WAIT_SECONDS 2
if lNetAddRec( "tools" )
? "New record was appended."
else
? "Network error! No record appended."
endif
/////////////////////////////
FUNCTION lNetAddRec( cAlias )
/////////////////////////////
do while .t.
if lAddRec( WAIT_SECONDS, cAlias )
RETURN .t.
endif
if alert ( "Could not append a new record.;", { "Try again", "Cancel" } ) != 1
RETURN .f.
endif
enddo
RETURN .f.
////////////////////////////////////
FUNCTION lAddRec( nSeconds, cAlias )
////////////////////////////////////
do while nSeconds > 0
( cAlias )->( dbAppend() )
if !neterr()
RETURN .t.
endif
inkey( .5 )
nSeconds -= 0.5
enddo
RETURN .f.
IMPORTANT: you must unlock the new record when you are ready editing it:
tools->( dbUnLock() )
Maybe this could help you.
Regards,
Detlef