Skip to Content
0
Former Member
Mar 21, 2006 at 04:07 PM

Query problem

19 Views

im trying to make a sample filtr on B1 table OHEM

Me.title is a param with the Date which interesed me. when Me.title ( String ) = "19980704" or = "1998/07/04"

and in myTable (Matrix of DBDataSource datas )i have one position with this value, im getting and exception error

(0xFFFFFFFFF): Exception from HRESUTL: 0xFFFFFFFFF. at ... Query(Conditions Conds). in the debag. cond.CondVal ="1998-07-04 00:00:00" so it was formated correctly !!

here is a part of the code:

conds = New SAPbouiCOM.Conditions

If (Me.title <> "") Then

cond = conds.Add

cond.BracketOpenNum = 1

cond.Alias = "startDate"

cond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

sDate = CDate(Me.title)

cond.CondVal=sDate.ToString

cond.BracketCloseNum = 1

End If

myTable.Clear()

myTable.AutoResizeColumns()

Try

myData.Query(conds)

Catch ex As Exception

SBO_Application.MessageBox(" query error " + ex.ToString)

End Try

Any answer could be very helpful !! Thanks