Hello,
I�m new to xbasic and would like some help. To get familiar with xbasic, I�m trying to copy some tables from my Alpha Four directory to my Alpha Five directory, update the indexes, and be able to view all records using Alpha Five. We�re still using Alpha Four for data entry for these tables. But I�d like to be able to copy the data over for aid in developing my forms & reports.
Here�s what I have so far. I�ve added the first 8 lines of text below to the xbasic for a button to open the form for a set that list records for the tables. Deltik.dbf is the parent and dellin.dbf is the child in the set. The records for the parent (deltik) are being copied and I can view all those records with A5, however, I am not able to view the related child records from the set (dellin). What could I do to get that to happen?
file_copy("h:a4v6deltik.dbf", "c:program filesa5v4deltik.dbf")
file_copy("h:a4v6dellin.dbf", "c:program filesa5v4dellin.dbf")
table.open("c:program filesa5v4deltik.dbf")
tbl=table.current()
tbl.update_production_index()
table.open("c:program filesa5v4dellin.dbf")
tbl=table.current()
tbl.update_production_index()
DIM ax_choice as C
DIM ax_response as N
DIM ax_dialog as P
ON ERROR GOTO ax_error_trap
DIM ax_error_trap_desc as C
DIM ax_error_trap_offset as C
DIM ax_error_trap_msg as C
DIM ax_error_trap_response as N
ax_error_trap_desc = "Action Script"
ax_error_trap_offset = "0"
ax_error_trap_desc = "Inline Xbasic"
ax_error_trap_offset = "1"
if is_object("Delivery") then
Delivery.show()
Delivery.activate()
else
:Form.view("Delivery")
end if
END
ax_error_trap:
ax_error_trap_msg = "Trapped error in action command: [" + ax_error_trap_offset + "] " + chr(13) + chr(13) + "Command: " + ax_error_trap_desc + chr(13) + "Error: " + error_text_get()
ax_error_trap_response = ui_msg_box("Action Program Error", ax_error_trap_msg, 2)
IF ax_error_trap_response = 4 THEN ''Retry
RESUME 0
ELSEIF ax_error_trap_response = 5 THEN ''Ignore
RESUME NEXT
ELSE ''Abort
END
END IF
''****
''**** End
THANK YOU,
MIKE
I�m new to xbasic and would like some help. To get familiar with xbasic, I�m trying to copy some tables from my Alpha Four directory to my Alpha Five directory, update the indexes, and be able to view all records using Alpha Five. We�re still using Alpha Four for data entry for these tables. But I�d like to be able to copy the data over for aid in developing my forms & reports.
Here�s what I have so far. I�ve added the first 8 lines of text below to the xbasic for a button to open the form for a set that list records for the tables. Deltik.dbf is the parent and dellin.dbf is the child in the set. The records for the parent (deltik) are being copied and I can view all those records with A5, however, I am not able to view the related child records from the set (dellin). What could I do to get that to happen?
file_copy("h:a4v6deltik.dbf", "c:program filesa5v4deltik.dbf")
file_copy("h:a4v6dellin.dbf", "c:program filesa5v4dellin.dbf")
table.open("c:program filesa5v4deltik.dbf")
tbl=table.current()
tbl.update_production_index()
table.open("c:program filesa5v4dellin.dbf")
tbl=table.current()
tbl.update_production_index()
DIM ax_choice as C
DIM ax_response as N
DIM ax_dialog as P
ON ERROR GOTO ax_error_trap
DIM ax_error_trap_desc as C
DIM ax_error_trap_offset as C
DIM ax_error_trap_msg as C
DIM ax_error_trap_response as N
ax_error_trap_desc = "Action Script"
ax_error_trap_offset = "0"
ax_error_trap_desc = "Inline Xbasic"
ax_error_trap_offset = "1"
if is_object("Delivery") then
Delivery.show()
Delivery.activate()
else
:Form.view("Delivery")
end if
END
ax_error_trap:
ax_error_trap_msg = "Trapped error in action command: [" + ax_error_trap_offset + "] " + chr(13) + chr(13) + "Command: " + ax_error_trap_desc + chr(13) + "Error: " + error_text_get()
ax_error_trap_response = ui_msg_box("Action Program Error", ax_error_trap_msg, 2)
IF ax_error_trap_response = 4 THEN ''Retry
RESUME 0
ELSEIF ax_error_trap_response = 5 THEN ''Ignore
RESUME NEXT
ELSE ''Abort
END
END IF
''****
''**** End
THANK YOU,
MIKE
Comment