![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Bug Reports Post about errors or bugs encountered. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi!
(i hope my english is good enough to understand) ;-) Im writing a tool to import/export contacts as vcards and have some trouble while accessing data: ************************************* First problem: Contact.WebPage setting Contact.WebPage by program to a nonvalid URL (without leading http://) produced an runtime error - not a real problem: syntaxcheck is possible;-) BUT: If Contact.Webpage contains an non valid URL (entering or editing the contact manually by user) then accessing to this field produces an runtime error! How to access or syntaxcheck this field if every access fails? *********************************************** Second problem: Contact.Birthday and Contact.Anniversary If the user has no date(s) in an contact entry the query strDate = Date(Contact.Birthday) delivers the date: 01/01/1601 in this case the reverse operation: Contact.Birthday = ParseDate(strDate) generates an runtime error to! If birthdday or anniversary set to an actual date -> No problem ************************************************** **** my sample code for the second problem (in case its an human problem): ************************************************** **** Sub Globals 'Declare the global variables here. End Sub Sub App_Start ErrorLabel(errHandler) Form1.Show Contact.New1 PimCol.New1("Contacts") nr = PimCol.FindItem("LastName","Tester") If nr > -1 Then Contact.Value = PimCol.GetItem(nr) ContactDateTicks=Contact.Birthday ContactDateString=Date(Contact.Birthday) 'reverse operation ContactDateNewTicks=DateParse(ContactDateString) 'for showing query results only Label1.Text = ContactDateTicks &crlf Label1.Text = Label1.Text & ContactDateString &crlf Label1.Text = Label1.Text & ContactDateNewTicks &crlf 'following line now fails if Contact entry is not set to a ?valid? date Contact.Birthday = ContactDateNewTicks Contact.Update Else Label1.Text = "Create a contact with Lastname: Tester first!" End If Label1.Text = Label1.Text & "SUCCESS!" Form1.Refresh Sleep(3000) AppClose errHandler: Label1.Text = Label1.Text & "FAIL!" Form1.Refresh Sleep(4000) AppClose End Sub Last edited by Gerd : 12-12-2007 at 11:02 AM. |
|
|||
|
Now i know a little bit more...
Quote:
at least two hours i tried some code to create a new or update an existing contact with an birthday entry : This date/code really fails: Contact.Birthday = DateParse("01/01/1601") And this really works: Contact.Birthday = DateParse("01/01/1901") BUT!!! The error accours not at putting the data into Contact.Birthday! The errors occours at: Contact.update or PimCol.AddItem(Contact.Value) +++++++++++++++++++++++++++++++++++ Code sample - in any case msgbox() will be showed with the ticks. After closing the MsgBox the Message "Fail" will be displayed (or not) +++++++++++++++++++++++++++++++++++ Sub App_Start ErrorLabel(errHandler) Form1.Show Contact.New1 PimCol.New1("Contacts") Contact.CreateNew Contact.LastName="Tester" ' Contact.Birthday = DateParse("01/01/1901") ' with this line it works Contact.Birthday = DateParse("01/01/1601") ' with this line it fails Msgbox(Contact.Birthday) PimCol.AddItem(Contact.Value) Sleep(3000) AppClose errHandler: Label1.Text = "FAIL!" Form1.Refresh Sleep(4000) AppClose End Sub +++++++++++++++ |
|
|||
|
Quote:
Manualy entering a date less then 1900 will be automatically corrected! Now i know that something goes wrong inside outlook.dll/Win Mobile 6/my Smartphone, that it is generating an non valid date while reading an empty entry ... So I have wrote a small hack around... Thanks to all and i wish you a happy new year! Gerd |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optomized compiling problems again. | J12345T | Questions & Help Needed | 10 | 09-08-2008 12:34 PM |
| Sprite problems | willisgt | Questions & Help Needed | 2 | 02-28-2008 06:30 PM |
| Form problems | Lasse | Questions & Help Needed | 11 | 10-09-2007 12:46 PM |
| FTP Library Problems | Louis | Questions & Help Needed | 1 | 06-19-2007 10:33 AM |
| OpenNet problems | Lasse | Questions & Help Needed | 7 | 05-20-2007 08:17 PM |