i try this one and its working as my sample
http://www.w3schools.com/sql/sql_func_max.asp
The problem is it require a handler and a parameter. I don't have an idea where do I put my handler so far this is my code
Code: Select all
  if connectionID is a number then 
   
   put fld "lblOrderNum" into orderNum
   
   put "Select MAX(orderNumber) from hos_tbldrorders" into tabay
   
   put revDataFromQuery(,,connectionID, tabay) into order
   
   put order + 1 into orderNum
   
   
else 
   answer warning "Cannot conenct to SERVER DATABASE please try again" titled "Connection Error"
   end if
   
thanks,
blaireTabay
