Page 1 of 1

Import feature corrupts data in table if all fields not used

Posted: Sat Oct 22, 2011 8:57 pm
by brucef2112
Dale,
As outlined in the user manual, if for example you want to import just fields 1 thru 7 the rest of the fields do not need to be specified. However, this allows the import wizard to corrupt the stock table data that is imported.

While I was importing a CSV file containing the STOCK NUMBER, DESCRIPTION, REG PRICE, SALE PRICE, and TAX fields, the import process introduced additional data into the CATEGORY and VENDOR fields on its own. It does not show when given the two previews of the data on the Copy screens. but after the import is finished all records will have the number 32 in both the CATEGORY and VENDOR fields.

I've tested back a few versions and this seems to have been around for a while (i'm using 7.10f). I'd say that most users do not fill the Category or Vendor tables to the 32nd position. So this is somewhat hidden from the user if both the Category and Vendor tables do not have anything assigned to their respective line 32. It only shows itself if you browse the table and move the cursor into the CATEGORY or VENDOR fields for any imported records.

Here is the CSV data I imported (the first 5 fields):

Code: Select all

"STOCK NUMBER","DESCRIPTION No commas allowed.","REG. PRICE","SALE PRICE","TAX CHART","PIECES SOLD","VALUE SOLD","CURRENT INVENTORY","CATEGORY NUMBER","VENDOR NUMBER",COST,"MODEL STOCK","PIECES PER PACK","VENDOR  STOCK# No commas allowed."
40450521031,"MJ Paper Plates 8pcs",3.99,,1
40450521033,"MJ Paper Cups 8pcs",3.99,,1
40450521035,"MJ Stickers/Scrapbooking",7.99,,1
40450521037,"MJ Note Pad",7.99,,1
40450521039,"MJ Note Cards(water clr)",18.99,,1
40450521041,"MJ Socks",14.50,,1
40450521043,"MJ Lanyard/NeckStap",1.99,,1
40450521045,"MJ Bracelet",7.99,,1
40450521047,"MJ Necklace",1.99,,1
40450521049,"MJ Game-Play Crds Asian",11.99,,1
40450521051,"MJ Theme 52dk PlayngCrds",5.99,,1
During the Copy from File to Create Clipboard, the two preview screens shows all five of the specified fields (which look good) and the CATEGORY and VENDOR fields are blank. However after you green light the Paste to the table, it results in a number 32 added in both the CATEGORY and VENDOR fields for the imported records. You can see this by placing the cursor in the CATEGORY or VENDOR field and scrolling up/down through the imported data in the table.

Here's some screen shots during the Copy to Clipboard from file and the results of a Paste Clipboard to Table.
Here is first Data Preview screen. All 5 fields looks good and the CAT and VEND fields are blank.
Image

Here is second Data Review screen. Still, all 5 fields looks good and the CAT and VEND fields are blank.
Image

After the Paste, all imported record's CAT and VEND will show a number 32 as you scroll up/down the column in the Stock Table.
Image

Re: Import feature corrupts data in table if all fields not

Posted: Wed Nov 09, 2011 7:53 pm
by daleadmin
Dale gets up off his ass and fixes something.

Actually that is a lie, I usually do my coding sitting down. However I do think that I have fixed this problem. Make a backup and try this out http://dhpos.com/stocks.exe and see if the problem has wandered off.

Report back,

Dale