Hi all

I am using nsbasic/ce 8 for wince device programming. I intend to use 
"newObjects.utilctls.SFStream" to transfer data between pc and handheld(ce 5 or 
mobile 6). However, it is very slow to transfer data (it took about 5 minutes 
to transfer 275 records) and i have more than 20000 records need to transfer 
over to handheld. I am using SQLite as handheld db and MYSQL as server db. In 
server site, i created a server host to connect to MYSQL server and wait for 
handheld session by using vb6. It took less than 5 minutes to finish process 
20000 records and ready to send to my handheld. Here is some of my code:


vb program
ls_sql = "SELECT inv_cd FROM product"
ll_record = SQLRecord(ls_sql, lrs_rec) 'function to connect table and fetch data
If ll_record > 0 Then
   With lrs_rec
      Do Until .EOF
         ...
         ls_stmt="INSERT Or Replace INTO ""tproduct"" VALUES(""" & !inv_cd... 
'more 100 characters
         wsServer(Index).SendData ls_stmt & vbCrLf
         .movenext
      Loop
   End With
end if

on wince(nsbasic)
 'timer event
 If state="Connected" Then
    cmd=strm.readtext(-1) 'read a line
    exe_stmt cmd,dbimSPP ' function to execute cmd into SQLite db
 end if

If newObjects.utilctls.SFStream is not a suitable solution, anything else can 
be done (ie transfer the whole file). 

Thanks
Teo


-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.

Reply via email to