Here is the code I execute in the interactive window. The array I am trying to create will only populate the last line, but no more. Any ideas on what I'm doing wrong here?
Thanks,
Mike
dim arr_email[0] as p
dim cn as SQL::Connection
dim args as SQL::Arguments
args.Set("order_no",1005)
order_qry = "SELECT ORDER_NO, DATE, UNIT, DESCRIPTION, NOTES, DATE(REQUEST_DATE) as RequestDate FROM order_detail where ORDER_NO=:order_no"
?cn.Execute(order_qry,args)
= .T.
rs = cn.ResultSet
txt_email = rs.ToJSONObjectSyntax(10)
A5_JSON_PopulateArray(arr_email,txt_email)
cnt_email = arr_email.size()
?txt_email
= {"ORDER_NO" : '1005', "DATE" : '05/15/2013 08:20:50 00 am', "UNIT" : 'test me', "DESCRIPTION" : 'Striker Side Door Jamb Complex Supply Jamb', "NOTES" : 'test 5', "RequestDate" : '05/16/2013'}
{"ORDER_NO" : '1005', "DATE" : '05/15/2013 10:28:40 00 am', "UNIT" : '852', "DESCRIPTION" : 'Cabinet Paint + Paint', "NOTES" : '', "RequestDate" : '05/17/2013'}
{"ORDER_NO" : '1005', "DATE" : '05/15/2013 10:28:40 00 am', "UNIT" : '1107', "DESCRIPTION" : '1 Bedroom Paint+ Paint999333', "NOTES" : '', "RequestDate" : '05/16/2013'}
?cnt_email
= 1
?arr_email
+[1].
?arr_email[1]
= DATE = "05/15/2013 10:28:40 00 am"
DESCRIPTION = "1 Bedroom Paint+ Paint999333"
NOTES = ""
ORDER_NO = "1005"
RequestDate = "05/16/2013"
UNIT = "1107"
Thanks,
Mike
dim arr_email[0] as p
dim cn as SQL::Connection
dim args as SQL::Arguments
args.Set("order_no",1005)
order_qry = "SELECT ORDER_NO, DATE, UNIT, DESCRIPTION, NOTES, DATE(REQUEST_DATE) as RequestDate FROM order_detail where ORDER_NO=:order_no"
?cn.Execute(order_qry,args)
= .T.
rs = cn.ResultSet
txt_email = rs.ToJSONObjectSyntax(10)
A5_JSON_PopulateArray(arr_email,txt_email)
cnt_email = arr_email.size()
?txt_email
= {"ORDER_NO" : '1005', "DATE" : '05/15/2013 08:20:50 00 am', "UNIT" : 'test me', "DESCRIPTION" : 'Striker Side Door Jamb Complex Supply Jamb', "NOTES" : 'test 5', "RequestDate" : '05/16/2013'}
{"ORDER_NO" : '1005', "DATE" : '05/15/2013 10:28:40 00 am', "UNIT" : '852', "DESCRIPTION" : 'Cabinet Paint + Paint', "NOTES" : '', "RequestDate" : '05/17/2013'}
{"ORDER_NO" : '1005', "DATE" : '05/15/2013 10:28:40 00 am', "UNIT" : '1107', "DESCRIPTION" : '1 Bedroom Paint+ Paint999333', "NOTES" : '', "RequestDate" : '05/16/2013'}
?cnt_email
= 1
?arr_email
+[1].
?arr_email[1]
= DATE = "05/15/2013 10:28:40 00 am"
DESCRIPTION = "1 Bedroom Paint+ Paint999333"
NOTES = ""
ORDER_NO = "1005"
RequestDate = "05/16/2013"
UNIT = "1107"
Comment