The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Nulls vs Blank question
Posted: 27 Oct 06 7:54 AM
|
fiogf49gjkf0d I discovered yesterday that one of my clients is being affected by a known SLX Bug:
Defect#1-39711 - in a nutshell>Invalid integer errors occur when date in a date/time control using a "ddddd" format is Null'd out on the Remote and Sync'd to the Host.
My question is this - I currently have some dates that get set to null in certain situations - these are the problem I am having when getting data back from the remote office. We specifically chose the data format and 'Date' fields (as opposed to Date/Time) due to GMT conversion. Is there any reason a shouldn't set those date values to '' (blank) instead of null to work around the defect?
Thanks Steve K. |
|
|
|
Re: Nulls vs Blank question
Posted: 27 Oct 06 1:50 PM
|
fiogf49gjkf0d You could use the default date of Jan 1st 1899 I believe it is, or pick some random date before the company was established to deem the "default". You could also change every control to a DateTimePicker, since the control doesn't allow nulls.
Anything you do seems like too much of a hack and has very little return value. The easiest solution would be to just wait for the hotfix but that's not something most people can do.
If I know the error, I want to say only that database value fails to synchronize but my luck it'd invalidate the entire record, not just a single column. |
|
|
|
Re: Nulls vs Blank question
Posted: 27 Oct 06 3:45 PM
|
fiogf49gjkf0d Steve,
Did you try all the combination of properties to see if you could come up with a combination that works?
Could you perhaps unbind the date field and attach a script to the whenchange event of then Date/Time object to update the database using SQL?
Could you replace your Active form with a Legacy view? |
|
|
|
Re: Nulls vs Blank question
Posted: 28 Oct 06 1:53 PM
|
fiogf49gjkf0d Originally posted by Steve Knowles
I discovered yesterday that one of my clients is being affected by a known SLX Bug:
Defect#1-39711 - in a nutshell>Invalid integer errors occur when date in a date/time control using a "ddddd" format is Null'd out on the Remote and Sync'd to the Host.
My question is this - I currently have some dates that get set to null in certain situations - these are the problem I am having when getting data back from the remote office. We specifically chose the data format and 'Date' fields (as opposed to Date/Time) due to GMT conversion. Is there any reason a shouldn't set those date values to '' (blank) instead of null to work around the defect?
Thanks Steve K. |
|
Contrary to "popular" belief... ALL fields in the db are DateTime no matter what you choose via the SalesLogix DB manager: A - DateTime - Fully GMT aware B - Date - NOT GMT aware C - Time - NOT GMT aware So, when you supply a value to these fields you MUST follow the rule in ALL cases: EVERY Date(time) must have CCYYMMDD HH:MM:SS For DateTime of NOW it would be 20061028 14:47:30 For Date of NOW it would be 20061028 00:00:00 For Time of NOW it could be 20061028 14:47:30 but 18990101 14:47:30 would be appropriate
Remember: A blank value in DateTime is 18990101 00:00:00 A NULL value in DateTime is NO DateTime
Oh yes.. the DTE control (even in v7) is Broken when it comes to date only. It puts in a full NOW in the DateTime property.... (20061028 14:47:30) it should be 20061028 00:00:00. If you do In-Line Dategrid editing w/the column setup correctly for date only you WILL get 20061028 00:00:00 as teh value in the db -- rjl |
|
|
|
Re: Nulls vs Blank question
Posted: 31 Jan 07 2:29 PM
|
fiogf49gjkf0d I'm using v7. I think I'm experiencing this same issue and was hoping that someone could help. I added a dte control to the opportunity details screen (Required Ship Date) and used the format dddd. I set this date to null by default because it is not a required field.
Just today, I discovered that updates to opportunities are NOT synching in from the remotes. No errors are reported by the sync service, either on the host or remotes. I looked at the transactions using TrnViewer and the update SQL statements LOOK fine, they just don't update the host database fields.
Could my DTE Control be the problem? |
|
|
|
Re: Nulls vs Blank question
Posted: 31 Jan 07 2:41 PM
|
fiogf49gjkf0d There's a bug that describes your problem perfectly, but it only applies when upgrading a database from 5.2 or before. There were composit keys missing and a couple of field mismatches that would cause data to sync to remotes, but no changes would be sent to the host. If this is an upgraded database, post a reply and I'll try to find the knowledge base articles again. You have to use supportonline's legacy knowledgebase as the default knowledgebase is typically for 6.2 and above problems only. |
|
|
|
Re: Nulls vs Blank question
Posted: 31 Jan 07 2:45 PM
|
fiogf49gjkf0d Sorry (for me) to say, that my SalesLogix install was new with v6.2. I recently (November) upgraded to v7. It seems a little suspicious that this "bug" has happened before. Do you think it could be something with the v7 upgrade? I added the DTE Control to the form within the last week, but I think the sync problems have been occurring for longer than that. Thanks for your help! |
|
|
|
Re: Nulls vs Blank question
Posted: 31 Jan 07 3:02 PM
|
fiogf49gjkf0d The issue I'm referring to is very specific to upgrading from previous versions so I highly doubt you've caught it. Could you test not setting your date to null? What about binding the text property instead of datetime? It converts date only strings correctly and for dates that aren't required I don't have to specifically null them out.
I'd try to eliminate everything else as the source of the problem. If you disable the date completely and the data still doesn't sync then it's almost 100% a data issue, not a code issue. |
|
|
|
Re: Nulls vs Blank question
Posted: 31 Jan 07 5:54 PM
|
fiogf49gjkf0d Originally posted by susanr
Sorry (for me) to say, that my SalesLogix install was new with v6.2. I recently (November) upgraded to v7. It seems a little suspicious that this "bug" has happened before. Do you think it could be something with the v7 upgrade? I added the DTE Control to the form within the last week, but I think the sync problems have been occurring for longer than that. Thanks for your help! |
|
Make sure you are binding to the DateTime property.. NOT Text. -- rjl |
|
|
|
Re: Nulls vs Blank question
Posted: 01 Feb 07 12:15 PM
|
fiogf49gjkf0d I'm pretty sure the date isn't my problem. I removed it from my form and it made no difference. I'm going to be working with my BP today. Hopefully they will be able to find something. Thanks for the suggestions! |
|
|
|
Re: Nulls vs Blank question
Posted: 03 Feb 07 5:14 PM
|
fiogf49gjkf0d So.. Were you (incorrectly) binding to the text field?
Oh yes.. FYI.. If you want to "null out" a datetime field, Set theateTime to CDbl(0) - not NULL
-- rjl |
|
|
|