Hi - Not sure if this helps, I have not written anything with NSB for 2 years 
but I did create an App in CE to allow capture and updating of fault data on 
construction sites.

After several tries I found it much quicker to create the SQLite db file on the 
desktop and transfer it to the CE device. Records could be added or updated on 
the CE device.

On reyirning to desk the desctop app would pull the file from CE synchronise 
records on desktop and return updated file to CE.

I used Srego control (see Desktop group for sample file for transfer)

I think George suggested something like this earlier in thread.

My first thought was to do it on the CE until I cottoned on to the fact that 
the data started on the desktop so why not pre-process it on the fastest thing 
I had.

Regards
John




--- In [email protected], "chris_kenworthy" <chrisk...@...> wrote:
>
> Ooh - I didn't realize that you could do SqLite transactions like this, with 
> each statement in its own db.execute statement, as opposed to grouping them 
> all into one string with semicolons to seperate them.
> 
> I'm going to have to try this version, both with newObjects and with gambas. 
> Thanks!
> 
> --- In [email protected], Thomas Gruber <computerhusky@> wrote:
> >
> > Hello,
> > no, the INSERT statement remains as it was.
> > This is the idea (using your code):
> > 
> > db.execute("BEGIN TRANSACTION")
> > Do
> >   recs = File.ReadText(-3)
> >   ...
> >   ...
> >   ...
> > Loop Untile file.EOS
> > db.execute("COMMIT TRANSACTION")
> > 
> > This may not work for 30.000 records, you may have to commit more 
> > frequently than that. Then you can put a counter inside the loop, like 
> > this, to commit the changes after every 1000 records written:
> > 
> > i = 0
> > db.execute("BEGIN TRANSACTION")
> > Do
> >   i = i + 1
> >  if i>      1000 then
> >     db.execute("COMMIT TRANSACTION")
> >    i = 0
> >    db.execute("BEGIN TRANSACTION")
> >   end if
> >   recs = File.ReadText(-3)
> >   ...
> >   ...
> >   ...
> > Loop Until file.EOS
> > db.execute("COMMIT TRANSACTION")
> > 
> > Kind regards
> > Thomas
>


-- 
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