Source language: Translate to:

NeoDB error message

Questions about NeoBook PlugIns

Moderator: Neosoft Support

NeoDB error message

Postby Wrangler » Mon Apr 16, 2007 8:28 am

I have a db with 3 fields: category, item, price. All are string fields.

Db is created fresh on startup. No records. When using this code:

dbfSetCellStyle "[pubdir]grocery.dbf" "White" "Arial" "8" "Normal" "Black"
dbfSetTitleStyle "[pubdir]grocery.dbf" "234,234,255" "Arial" "8" "Bold" "Navy"
dbfSetColumnOrder "[pubdir]grocery.dbf" "Category|Price|Item"
dbfSetColumnWidths "[pubdir]grocery.dbf" "125|50|201"
dbfSort "[pubdir]grocery.dbf" "tablesort.ndx" "category|item" "Ascending"
dbfShowTable "[pubdir]grocery.dbf" "Rectangle1" "ReadOnly"

I get this error message: Invalid field name or syntax: "category item"

Error occurs on dbfsort. Also does it after adding record to db, but then it doesn't retain the category field data. If there are 2 records in db, still get the error, but data is retained in fields.

Using latest versions of everything.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Gaev » Mon Apr 16, 2007 9:02 am

Wrangler:

I always use dbfDefineAlias ... so I have no personal experience with this ... but you might try specifying the "database file name" in each of the dbfXXX commands without the [PubDir] folder specification.

The only other thing you might look at (closely) is your dbfCreate command ... perhaps copy/paste it here ... in case there was a syntax error in the field definition.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Wrangler » Mon Apr 16, 2007 9:09 am

I have used this code a hundred times in the past with no problem. Matter of fact, it worked yesterday. Only today I fired up nb, and got the error. I re-installed neodb, and patched the latest nb. No help.

Thanks for the suggestion. I'll play around with it some more, but I'm losing patience. These dumb little anomolies eat up valuable coding time. :x

dbfcreate command:

dbfCreate "[pubdir]grocery.dbf" "Item,String,35|Category,String,35|price,String,35" ""
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Wrangler » Mon Apr 16, 2007 9:26 am

Update: Removing [pubdir] from table code and create code, then deleting db and creating new, fixed the problem. ????????

Neobook must be interpeting [pubdir] incorrectly. My compile settings are correct.

Dave: Any idea what would cause this?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby beno » Mon Apr 16, 2007 9:27 am

Hi Wrangler,

I tried your code and works perfect on my PC.

The only thing I have different is that I´m using NB 5.5.3a

I have been lazy and have not installed 3b yet :wink:

HTH,

beno
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby beno » Mon Apr 16, 2007 9:28 am

Hi,

Mmmmhhh about the [PubDir] thing... I use this very often and have NO problems with it.

My cent,

beno
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby Wrangler » Mon Apr 16, 2007 9:35 am

Mmmmhhh about the [PubDir] thing... I use this very often and have NO problems with it.


Me too. Since day one. Since it just started today, I doubt it's a neobook bug. It appears for some reason [pubdir] and neodb don't interpet correctly. I'm using [pubdir] everywhere else in the pub, with no problems.

Well, first I'll try rebooting. Then I'll test some other pubs for the same problem or not.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Wrangler » Mon Apr 16, 2007 10:01 am

Hmmmm. Rebooted, re-inserted [pubdir] one by one in table code and open and create code, and I can't recreate the error. :D :(

Guess I'll have to chalk this one off to a bad Windows boot. Sorry for taking up you guys valuable time. Thanks for the replies.

I also had some problems with dbfstrreplace. I'll see if I can now get that to work.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Gaev » Mon Apr 16, 2007 10:07 am

Wrangler:
Update: Removing [pubdir] from table code and create code, then deleting db and creating new, fixed the problem. ????????

Sounds like you might have had a corrupted dbf file ... note that when you do a dbfCreate and the file exists, the currently available file is used ... but when you explicitly deleted the file, your problems went away.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Wrangler » Mon Apr 16, 2007 11:22 am

Well, I don't think so, because I deleted the db many times during my tests.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Neosoft Support » Mon Apr 16, 2007 11:50 am

I'm not aware of any problems with [pubdir]. It always points to the folder where the pub exe resides. It shouldn't change unless you change the compiler's "compile to" setting.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron