Xbrowse ADO
Posted: Tue Oct 28, 2014 6:00 am
Currently I am using a simple calendar that when double clicking on a day, I would like it to open an Xbrowse and reveal messages for that day.
I am passing the selected day to my Xbrowse RecDate(cal_dte) function but am unable to get oRs:find() to recognize the passed var (dCal_dte).
As the excerpt shows by assigning any date, everything works , OK ,but the syntax to utilize the passed var is lacking.
The .dbf field format is Date 10 .
What is the proper form for the find() to achieve this ?
Here is an excerpt from that function :
>>>>>>>>
func RecDate(cal_dte) // Date : 10/17/14
// Update : 10/17/14
// Purpose : Use ADO with a message .dbf
local dCal_dte := cal_dte
local oCn, oRs
local oWnd, oFont, oBrw, oMiSort
local oDlg
local oErr
SET DATE AMERICAN
SET CENTURY ON
oCn := FW_OpenAdoConnection( cPath_seg )
oRs := FW_OpenRecordSet( oCn, "CAL_REC" )
oRs:sort:= 'CAL_DTE'
oRs:MoveFirst()
try
oRs:find("CAL_DTE = 10/21/2014") // works OK , if exact date is in the .dbf
//oRs:find("CAL_DTE = dCal_dte") // does not work, syntax problem ??, I've tried variations,but obviously not the correct one ???
oRs:Update()
catch oErr
MsginFo( "no messages for that date " )
return oWnd
End try
>>>>>>>>>>>
FWH 14.08
Harbour 3.2.0dev
Bcc 582
Thanks,
Bruce S.
I am passing the selected day to my Xbrowse RecDate(cal_dte) function but am unable to get oRs:find() to recognize the passed var (dCal_dte).
As the excerpt shows by assigning any date, everything works , OK ,but the syntax to utilize the passed var is lacking.
The .dbf field format is Date 10 .
What is the proper form for the find() to achieve this ?
Here is an excerpt from that function :
>>>>>>>>
func RecDate(cal_dte) // Date : 10/17/14
// Update : 10/17/14
// Purpose : Use ADO with a message .dbf
local dCal_dte := cal_dte
local oCn, oRs
local oWnd, oFont, oBrw, oMiSort
local oDlg
local oErr
SET DATE AMERICAN
SET CENTURY ON
oCn := FW_OpenAdoConnection( cPath_seg )
oRs := FW_OpenRecordSet( oCn, "CAL_REC" )
oRs:sort:= 'CAL_DTE'
oRs:MoveFirst()
try
oRs:find("CAL_DTE = 10/21/2014") // works OK , if exact date is in the .dbf
//oRs:find("CAL_DTE = dCal_dte") // does not work, syntax problem ??, I've tried variations,but obviously not the correct one ???
oRs:Update()
catch oErr
MsginFo( "no messages for that date " )
return oWnd
End try
>>>>>>>>>>>
FWH 14.08
Harbour 3.2.0dev
Bcc 582
Thanks,
Bruce S.