[nsbasic-ce] Re: File reading help

2010-02-23 Thread bigp...@rogers.com
Also When using the File.Find command how to I code it so that for the specific line in the file .eg. 1,C0AAA006,"AAA MOBILE STORAGE(ON)"0001,, I only want it to search the data in the second comma, in the examples case above it would be "C0AAA006" and not have to read the entire

Re: [nsbasic-ce] text file xfer from xp

2010-02-23 Thread George Henne
Which control are you using to read the file? >I'm trying to format records in XP pulled from a database and sync them >to a PDA. I want to read the records on the PDA as a direct file ala: > >file.Get fileRec, loc > >where loc is the record number. I'm not having much luck. DOes anyone >know how

Re: [nsbasic-ce] Re: File reading help

2010-02-23 Thread George Henne
That probably won't make much difference to the execution time. Files are stored in memory, which is much faster that accessing from a hard drive. Even then, when you do a read, the OS read a whole block in. Reading part of a record takes essentially the same time as reading the full record. Spli

[nsbasic-ce] Re: File reading help

2010-02-23 Thread chris_kenworthy
Hey! I've actually been doing some work recently on speeding up bulk insert into Sqlite. My findings may be of interest to you. First, there's this entry in the Sqlite FAQ: http://www.sqlite.org/faq.html#q19 The key is grouping as many inserts as possible into one transaction, so what I've been

[nsbasic-ce] Re: File reading help

2010-02-23 Thread chris_kenworthy
--- In nsbasic...@yahoogroups.com, "bigp...@..." wrote: > > Also When using the File.Find command how to I code it so that for the > specific line in the file .eg. 1,C0AAA006,"AAA MOBILE > STORAGE(ON)"0001,, > I only want it to search the data in the second comma, in the examp

[nsbasic-ce] Re: Help

2010-02-23 Thread georgeewalters
Yes, that stuff is in the program AddObject "filesystem" AddObject "file" even if I do this, ignoring the file reads I still get nothing in the list box ListBox1.AddItem "bunch of junk stuff" Do I need something like Sub ListBox1_Load ?? --- In nsbasic...@yahoogroups.com, "chris_kenworthy"

[nsbasic-ce] Help

2010-02-23 Thread georgeewalters
Newbee (old returning) trying to load a list box when initing the program. Sub Form1_Load Description.UppercaseOnly = True Description2.UppercaseOnly= True ItemNbr.SetFocus Keyboardstatus = 1 Init End Sub Sub Init On Error Resume Next fil

[nsbasic-ce] Re: Help

2010-02-23 Thread chris_kenworthy
First question - is there any other code or setup in the program regarding the File control? There isn't a built-in one in NSbasic - you need to do an AddObject line or something similar. Also, if you're not going to do any more error checking, then you should probably add an 'On Error Goto 0'

RE: [nsbasic-ce] text file xfer from xp

2010-02-23 Thread George Walters
I figured out my problem. Thanks for trying to help. George Walters -Original Message- From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On Behalf Of George Henne Sent: Tuesday, February 23, 2010 6:21 AM To: nsbasic...@yahoogroups.com Subject: Re: [nsbasic-ce] text file

[nsbasic-ce] Re: Help

2010-02-23 Thread chris_kenworthy
The "filesystem" and "file" controls are no longer supported - I think that this might be where your problem gets started. Take a look at this tutorial for some intro to the newer filesystem and file objects: http://www.nsbasic.com/ce/info/technotes/TT06.htm The ListBox1.AddItem line should defi

Re: [nsbasic-ce] Re: File reading help

2010-02-23 Thread Thomas Gruber
Hello, I assume that the 1st value you insert is some sort of key in the database table? Is it indexed/unique? It may be worth removing the index before the insert, inserting the 30.000 records, then re-creating the index, if you can be sure that the values are all unique and no REPLACE operatio

[nsbasic-ce] Manual on Tabs

2010-02-23 Thread georgeewalters
3.5.3 Formatting a program To make your program easier to read, use spaces or tabs to indent related statements. This is usually done with statements inside procedures and loops. The default tabwidth and indentation in NS Basic/CE is two spaces. To automatically reformat an entire program, choose "

Re: [nsbasic-ce] Manual on Tabs

2010-02-23 Thread George Henne
This is from Chapter 3, which deals with the Device IDE. >3.5.3 Formatting a program >To make your program easier to read, use spaces or tabs to >indent related statements. This is usually done with >statements inside procedures and loops. The default >tabwidth and indentation in NS Basic/CE is tw

RE: [nsbasic-ce] Manual on Tabs

2010-02-23 Thread George Walters
So where do you do this on the windows IDE? -Original Message- From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On Behalf Of George Henne Sent: Tuesday, February 23, 2010 2:15 PM To: nsbasic...@yahoogroups.com Subject: Re: [nsbasic-ce] Manual on Tabs This is from Chapt

[nsbasic-ce] Re: File reading help

2010-02-23 Thread bigp...@rogers.com
Hey, Thanks for all the reply's. Only been using this about two weeks now and never done programming before. Not using the Inert command does not speed it up much, it inserts about another 100 recs per minute. Would take 45 mins to insert all 30,000 recs What I doing now is giving the user the

Re(2): [nsbasic-ce] Manual on Tabs

2010-02-23 Thread George Henne
The desktop does not have this feature. George Henne NS BASIC Corporation http://www.nsbasic.com >So where do you do this on the windows IDE? > >-Original Message- >From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On >Behalf Of Geo

[nsbasic-ce] Re: File reading help

2010-02-23 Thread joespan123
If you want to indicate to the user that it is doing something then use the following: WaitCursor(True) do you stuff here WaitCursor(False) This will display the standard twirly 4 quadrant busy cursor. In my application I also have data files that are huge and the application re

Re: [nsbasic-ce] Re: File reading help

2010-02-23 Thread Thomas Gruber
Hello, I did a few performance tests with SQLite, with the desktop version though, not CE. I suspect, but can't test it at the moment, that the CE version will behave in a similar way roughly. First of all, I ran a loop of 1000 inserts to a table (I used the SQLite example program from NSBasic w

[nsbasic-ce] Re: File reading help

2010-02-23 Thread bigp...@rogers.com
How would I go about programming the array code to say.if SplitString(1)(which is customer name) is equal to textbox, then add Splitstring(2)(Which is the equipmentNumber) to the combo box add item list? I've done that below, but each time that code is preformed it is just re-reading the fi

Re: [nsbasic-ce] Re: File reading help

2010-02-23 Thread Jay Young
Thomas, Do you have any code examples? Jay On Tue, Feb 23, 2010 at 2:22 PM, bigp...@rogers.com wrote: > > > How would I go about programming the array code to say.if > SplitString(1)(which is customer name) is equal to textbox, then add > Splitstring(2)(Which is the equipmentNumber) to the

[nsbasic-ce] Re: File reading help

2010-02-23 Thread bigp...@rogers.com
So i replace the Word "INSERT" with "BEGIN TRANSACTION"? If the code is Do recs = File.ReadText(-3) def= Split(recs,",") abc = Split(def(3),) cmd="INSERT OR REPLACE INTO ""NameDB2"" VALUES(""" & def(1) & """,""" & abc(1) &""")" Set r=db.Execute(cmd)

[nsbasic-ce] Re: File reading help

2010-02-23 Thread bigp...@rogers.com
For the following code where do I use the Begin/Commit transaction? Do I replace the word INSERT? Do recs = File.ReadText(-3) def= Split(recs,",") abc = Split(def(3),) cmd="INSERT OR REPLACE INTO ""NameDB2"" VALUES(""" & def(1) & """,""" & abc(1) &""")"

Re: [nsbasic-ce] Re: File reading help

2010-02-23 Thread Thomas Gruber
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

[nsbasic-ce] Re: File reading help

2010-02-23 Thread chris_kenworthy
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! --

[nsbasic-ce] Re: File reading help

2010-02-23 Thread bodyjohn2003
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