Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to read Pal Treo data
Message
From
13/07/2006 09:03:54
 
 
To
12/07/2006 17:37:41
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01134785
Message ID:
01135996
Views:
10
>>>Searching Google I found out that the key to reading Palm Treo data is developing a "Conduit" that will connect to the Palm Treo itself just like the synch software does.
>>>
>>>Has anyone here developed any such conduit that can serve as a starting point?
>>>
>>>Thank you vey much.
>>>
>>>Alex
>>
>>A conduit is required if you are going to manage update of data on the PC and the device. If you just want to collect data on the device and download it to a pc, or the other way around, you dont need one.
>>
>>Exactly what do you want to do?
>>
>>Carlos
>
>Thanks for the reply, Carlos. I don;t need to update the Palm, only read phone book data into DBF tables for later printing.
>
>Alex

OK, go to http://www.handheld-basic.com/ and download HB++. Of this program, you are just going to use the hbdao.dll

You can see the reference here: http://www.handheld-basic.com/documentation/text/obj_hb_rawdb.html

You can freely use the hbdao.dll file, I have checked with them by email.

When you sincronize a Palm, you have a copy of the pdb tables in the user backup folder.

All you have left is to find the structure of the adress book pdb. I don't have it.

Sample code:
loPDBTable = Createobject("HbDAO.HB_RawDB", "HbDAO")
loPDBTable.OpenTable(lcPDBFile)

If loPDBTable.RecordCount = 0 Then
  lcMsgText = "No hay registros para importar"
  Messagebox(lcMsgText,0+48,goApp.Title)
  loPDBTable.Close
  Return
Endif

loPDBTable.MoveFirst

lnRead = 0
lnRecs = loPDBTable.RecordCount

Thisform.Progressbar.Value = 0
Thisform.Progressbar.Max = lnRecs
Thisform.Progressbar.Visible = .T.

Do While Not loPDBTable.Eof
  laField(1) = loPDBTable.Stringat(-1)
  laField(2) = loPDBTable.Stringat(-1)
  laField(3) = loPDBTable.Stringat(-1)
  laField(4) = loPDBTable.Stringat(-1)
  laField(5) = loPDBTable.Stringat(-1)

   m.recid = laField(1) + Alltrim(Str(loPDBTable.UniqueID,24,0))
  If Seek(m.recid,"rom3") = .F. Then
    m.nroroma = Left(laField(2),3)
    m.nroitem = "00" + Right(laField(2),2)
    m.kcodbar = laField(3)
    m.kcodart = Substr(m.kcodbar,1,4)
    m.kclave  = Substr(m.kcodbar,8,2)
    m.scant   = 1 * laField(5)
    m.sneto   = Val(Substr(m.kcodbar,17,5))/100 * laField(5)
    m.stara   = Val(Substr(m.kcodbar,12,5))/100 * laField(5)
    m.sbruto   = m.sneto + m.stara
    m.sector = laField(4)
    Insert Into rom3 From Memvar
    lnRead = lnRead + 1
  Endif
  loPDBTable.MoveNext

  Thisform.Progressbar.Value = Thisform.Progressbar.Value + 1
Enddo

loPDBTable.Close
Links:

http://www.nsbasic.com/palm/info/technotes/TN02a.htm
http://www.palmos.com/dev/support/docs/fileformats/Intro.html
http://www.palmos.com/dev/support/docs/palmos/
Previous
Reply
Map
View

Click here to load this message in the networking platform