TRY ** Make sure it is not in use IF USED("a_counter_inout" SELECT a_counter_inout ENDIF USE a_counter_inout EXCLUSIVE *GO TOP && no need since you're zapping anyways ZAP CATCH TO tblError ** Error could be due to being unable to use exclusively. * Check first before creating the table IF tblError.ErrorNo <> 1705 CREATE TABLE data\a_counter_inout ; (release l, ; datein d, ; returned l, ; dateout d, ; remarks c(200), ; coll_date d) ENDIF FINALLY CLOSE TABLES ALL ENDTRYFor the #DEFINE, put the value in between quotes, i.e.
#DEFINE Create_dt1 "CREATE CURSOR test (lname c(30),fname c(30),mname c(30))"HTH,
>TRY > USE a_counter_inout EXCLUSIVE > GO TOP > ZAP > CATCH TO tblError > CREATE TABLE data\a_counter_inout; > (release l, ; > datein d, ; > returned l, ; > dateout d, ; > remarks c(200),; > coll_date d) > EXIT > FINALLY > CLOSE TABLES ALL >ENDTRY>