I have created a temporary cursor from existing sql table on form load event of Purchase form, as follows. Just in case if the supplier not available, there is a command button on the purchase form to create supplier, it calls the supplier creation form, where I have written the same code to create temporary supplier cursor, on this occasion supplier is created and the supplier create form get closes. But the purchase form throws a message saying Alias '__5GMX....' is not found.
public supplier
supplier="_"+SYS(2015)
lnHandle = SQLStringConnect("Driver={SQL Server};Server=SOMEONE\SQLEXPRESS;Database=softcode;user=sa;Pwd=password")
SQLEXEC(lnHandle,"SELECT * FROM supplier","ftemp")
SELECT * FROM ftemp INTO CURSOR &supplier READWRITE
I think when supplier form creates supplier="_"+SYS(2015), it eliminate the temporary variable create by purchase form. is there any way I can overcome this problem I mean variable supplier specific for a form??.
MSiddeek.
public supplier
supplier="_"+SYS(2015)
lnHandle = SQLStringConnect("Driver={SQL Server};Server=SOMEONE\SQLEXPRESS;Database=softcode;user=sa;Pwd=password")
SQLEXEC(lnHandle,"SELECT * FROM supplier","ftemp")
SELECT * FROM ftemp INTO CURSOR &supplier READWRITE
I think when supplier form creates supplier="_"+SYS(2015), it eliminate the temporary variable create by purchase form. is there any way I can overcome this problem I mean variable supplier specific for a form??.
MSiddeek.