DIM GLOBAL pDlg1 as waitdialog
pDlg1.Set_Title("Please Wait")
pDlg1.Create(2,"Percent")
pDlg1.Set_Message("Please wait, communicate to SQL server")
pDlg1.Set_Bottom_Message("Generating summary of usage data ")
what is the best way to make my percentage graph run while fetching a typical sql records.
typical i count the number of sql records..example...
dim sqlStatement as c
dim transit_record_count as n = 0
sqlStatement = "SELECT count(*) FROM request_transit_summary where (upd <> 'delete' or upd <> 'b99999')"
flagResult = cn.Execute(sqlStatement)
if flagResult = .f. then
ui_msg_box("Error, empty record",cn.CallResult.text)
cn.close()
end
end if
rs = cn.ResultSet
transit_record_count = val(alltrim(str(rs.data(1))))
pDlg1.Set_Percent(0,transit_record_count)
now.. what am i suppose to do, as i began retrieiving the records.
one at the time, how do i update the graph?
what is the proper sql syntext to get the "current processed record?" or xxxx value/
pDlg1.Set_Percent(xxxxx,transit_record_count)
my typical select statement.... as follow..
where and what do i need to insert in order to get the current record value?
sqlstatement = "SELECT cast(upd as char(6)) + '',\
isnull(cast(description as char(45)),' ') + ' ',\
isnull(cast(ttl_value_ship as char(12)),' ') \
FROM request_transit_summary where (upd <> 'delete' or upd <> 'b99999') order by upd asc"
flagResult = cn.Execute(sqlStatement)
if flagResult = .f. then
ui_msg_box("Error",cn.CallResult.text)
cn.close()
end
end if
on error goto error_handler
dim rs as sql::resultset
rs = cn.ResultSet
review_summary_list = cn.ResultSet.tostring()
review_summary_list = strtran(review_summary_list,CHR(9),CHR(32))
cn.Close()
thanks
ken tjia
pDlg1.Set_Title("Please Wait")
pDlg1.Create(2,"Percent")
pDlg1.Set_Message("Please wait, communicate to SQL server")
pDlg1.Set_Bottom_Message("Generating summary of usage data ")
what is the best way to make my percentage graph run while fetching a typical sql records.
typical i count the number of sql records..example...
dim sqlStatement as c
dim transit_record_count as n = 0
sqlStatement = "SELECT count(*) FROM request_transit_summary where (upd <> 'delete' or upd <> 'b99999')"
flagResult = cn.Execute(sqlStatement)
if flagResult = .f. then
ui_msg_box("Error, empty record",cn.CallResult.text)
cn.close()
end
end if
rs = cn.ResultSet
transit_record_count = val(alltrim(str(rs.data(1))))
pDlg1.Set_Percent(0,transit_record_count)
now.. what am i suppose to do, as i began retrieiving the records.
one at the time, how do i update the graph?
what is the proper sql syntext to get the "current processed record?" or xxxx value/
pDlg1.Set_Percent(xxxxx,transit_record_count)
my typical select statement.... as follow..
where and what do i need to insert in order to get the current record value?
sqlstatement = "SELECT cast(upd as char(6)) + '',\
isnull(cast(description as char(45)),' ') + ' ',\
isnull(cast(ttl_value_ship as char(12)),' ') \
FROM request_transit_summary where (upd <> 'delete' or upd <> 'b99999') order by upd asc"
flagResult = cn.Execute(sqlStatement)
if flagResult = .f. then
ui_msg_box("Error",cn.CallResult.text)
cn.close()
end
end if
on error goto error_handler
dim rs as sql::resultset
rs = cn.ResultSet
review_summary_list = cn.ResultSet.tostring()
review_summary_list = strtran(review_summary_list,CHR(9),CHR(32))
cn.Close()
thanks
ken tjia
Comment