08-03-2010 08:11 AM - edited 08-03-2010 08:12 AM
Well I made an attempt at translating this but had the same results you're having. I thought I was just translating what I had in c into VB, but there's obviously some syntax issue that i'm not aware of.
Here's what I have that isn't working in case it's helpful in some way
Dim ContactField As ContactFieldDescriptor =
_afw.Contacts.GetContactFieldDescriptor("TBL_CONTA
Dim FilterArray(1) As IFilterCriteria
Dim startDate As System.DateTime = System.DateTime.Parse("1/1/1900")
Dim endDate As System.DateTime = System.DateTime.Parse("1/1/2050")
FilterArray(0) = New Act.Framework.DateFilterCriteria(ContactField, startDate, endDate)
Dim List As ContactList = _afw.Contacts.GetContacts(Nothing, FilterArray)
08-03-2010 11:25 AM
So when I inspect the filter, the value I get is listed below:
?FilterArray(0).GetClause
"TBL_CONTACT.EDITDATE >= '1900-01-01T05:00:00' AND TBL_CONTACT.EDITDATE < '2050-01-02T04:59:59'"
I'm not sure if the date on this query really reflects a correct SQL date. I have never seen an SQL date to be '1900-01-01T05:00:00' . Maybe it is a new numenclature. Could this be the problem?
I tried all kinds of different avenues on this, with no luck. I'd think you have the same problem with C# . I know C# pretty well and the code in VB.net is the same as the one in C# that is posted.
Any help on getting this working is much welcome. Anybody at Sage that can help us on this?
08-03-2010 01:41 PM
I was very surprised that the c# code worked and the vb didn't, like you said, they appear to be identical. Seems I remember there being some difference in filter in c# and vb but I can't seem to find the article again.
I could try bouncing this off a few folks here, but I honestly can't think of any that use VB. =\
Might be worthwhile to bounce this off the folks at MSDN as it may have something to do with .NET since our code appears to me to be identical.