Source language: Translate to:

Blank record

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Blank record

Postby BRobinsonS » Mon Aug 19, 2013 5:58 pm

I seem to end up with a blank record occasionally in a database table.
Recently a record at the top of the table had all blank fields although there was information there originally.
My fear is that I have lost other records without knowing it.
I originally thought I had just inserted a record (blank) by mistake but not in this case.

I have a primary index etc from advice in this forum.

Any thoughts ?
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby Neosoft Support » Tue Aug 20, 2013 9:32 am

It would be unusual for records to just vanish, but it is possible to create an empty/blank record. For example, dbpSaveRecords will save an empty record to the datebase. Also, if you have fields linked to Text Entry objects, then typing a space into one of the fields will trigger an automatic save.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Blank record

Postby BRobinsonS » Tue Aug 20, 2013 9:58 am

I will have to review my dbpSaveRecords use.
It occurred to me that I added a field to the table (using my own db app) which may have triggered an empty record.
Again I'll have to look at the code in my db app too.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby BRobinsonS » Sat Aug 24, 2013 12:21 pm

Just realized my 'blank record' (first in table index by Name) occurred when I added a new field to the table using my own db Utility.

I do use a dialog box to choose field type(drop-down box) and length of field if Char or String.
Then, dbpAddField "[DatabaseName]" "[TableName]" "[FieldName]" "[FieldTypes]"

Don't know why this would wipe out the contents of the first record (first indexed record) in the table.

Ideas while I look closer at my code?
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby Neosoft Support » Mon Aug 26, 2013 9:42 am

The only thing I can think of is that the lost record was newly created and hadn't been saved prior to calling dbpAddfield.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Blank record

Postby BRobinsonS » Mon Aug 26, 2013 10:13 am

The record pre-existed. In fact it is the first record in the table.
After deletion of records while creating the app/table (first field 'id' autoInc primarykey), the first record id autoinc has value of 38.

Certainly is a puzzle.
Perhaps I will try a simple app that would only be used to add a field and see what happens to the table.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby BRobinsonS » Mon Aug 26, 2013 11:52 am

Still on the trail of 'blanking out' a record.
I created a simple app to open the database and table in question by button.
Added an 'Add Field' button and 'Close table' button so I could open and close table.

Used Add Field button and field was added. Closed the table and opened it again.
No blank record.

Opened the table in my DB Utility app to work with tables.
Open DB and Table Ok. Closed the DB and then opened again and 'Blank record' showed up again.
This DB has two tables and a blank record (pre-existing) showed up there too.

Can't see opening and closing tables would cause blank record.
So there has to be something in my DB Utility app with regard to opening and closing db/tables .

Thoughts are still welcomed.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby BRobinsonS » Mon Aug 26, 2013 2:03 pm

May have found the problem.
I was using a subroutine to populate a ListBox for displaying fields with definitions of a table.
This 'fired up' on opening a table or changing tables.

Blank records is not showing up now. :D
after hours of trying ...
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Blank record

Postby Neosoft Support » Tue Aug 27, 2013 9:41 am

That's interesting. I'm glad that you found a solution.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest