can someone help me.. with my code because it wont show up data at my grid vfp 8..
below code that i use at my command button vfp 8 to filtering smalldatetime on sql server
if smalldatetime sql server like this date 27/03/2025 00:00:00, the grid vfp 8 show up the data is. but if 27/03/2025 13:01:41, the grid vfp dont show up the data is..
below code that i use at my command button vfp 8 to filtering smalldatetime on sql server
Code:
Local lcSQL, lcColumnname, lcValue1
lcColumnname1 = thisform.cmbKeyColumn.value
*lcValue1 = date(year(thisform.txtTanggal.value),month(thisform.txtTanggal.value),day(thisform.txtTanggal.value))
*lcValue1 = ttod(thisform.tanggal.value)
lcValue1 = thisform.tanggal.value
Use In (Select('crsSampleData'))
TEXT TO m.lcSQL TEXTMERGE noshow
SELECT TOP(100) * from << TRIM(crsTables.TableName) >>
where << (m.lcColumnname1) >> = ?m.lcValue1
ENDTEXT
SQLExec(Thisform.nHandle, m.lcSQL ,'crsSampleData')
With Thisform.grid1
.DeleteMark = .F.
.ColumnCount = -1
.RecordSource = "crsSampleData" && Main Database Opened
.AutoFit()
Local ix
For ix = 1 To .ColumnCount
Bindevent( Getpem(.Columns(m.ix),'Text1'), 'DblClick', Thisform, 'TableNameDblClick')
Endfor
Endwith
if smalldatetime sql server like this date 27/03/2025 00:00:00, the grid vfp 8 show up the data is. but if 27/03/2025 13:01:41, the grid vfp dont show up the data is..