Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Enhancement Pack problem - Data Files don't seem to work

Author
Message
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Jan 2008 00:43
I just tried to read in a CSV comma delimited data file, exported from Excel, in DBP with the Enhancement pack Data File commands. Unfortunately they seem to be broken, just like every other Enhancement pack thing I've tried lately.

"GET DATA FILE ROW COUNT" returns the correct number of rows, but " GET DATA FILE COLUMN COUNT" does not, it reports far fewer columns that I actually have. When I read back a few values it works okay, but as soon as I try to print every cell value in the file I get a silent crash.

Should I just give up on this, or is there something I should know about using the commands?


Come see the WIP!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Jan 2008 21:33
Believe me Cash, you should give up on this! I reported this and also lots of other Enhancements Pack related bugs but they where never fixed to the date. I used CSV files for one of my old projects too but then I found out that the data file commands does not contain get data file exists() command which I badly wanted then. I reported this when the Lee hit the last bug week (which was almost two years ago) he said he added the command and that it will be included in the next release. But when the I download this latest release data file commands where broken and the get data file exists() command didn't existed too. I thought oh well and gave up. Never used anything else than the BLOCK and CPU/MEMORY commands from the pack. Almost all other command sets are broken or incomplete. Shame TGC!


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.6b
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Jan 2008 23:04 Edited at: 22nd Jan 2008 23:05
Yeah, I've already given up. It just sucks to not only have to redo something that's already been done, but something that I paid for. Using IanM's plugins, which do work I made my own CSV parser. It's surprisingly fast too, I can load a 275x58 cell spreadsheet and parse all of the data to their correct data types in 200 ms and a cost of 880kb of memory. It's actually better this way too, I made the spreadsheet searchable by key name and row, for instance I could say char(i).name$=findSpreadsheetValue$(row,"name") or char(i).health=findSpreadsheetValue(row,"health"). The only real issue is DBP's UDT string memory leak, if I zero out the spreadsheet array I only free up 325kb of memory instead of the actual 880kb. I loaded and unloaded it 10 times and it sucked up 15mb of ram. That's okay if you're loading a single spreadsheet, but I sure wouldn't use DBP to make a serious spreadsheet app or anything.


Come see the WIP!
Vidiot
17
Years of Service
User Offline
Joined: 15th May 2006
Location: TN
Posted: 26th Jan 2008 23:08
Hi Guys,

I'm going to post a simple program I created that uses the Enhancement Pak data functions to convert an XL .csv file into a plain flat sequential file. Its been in use since last May so I know it works. I can't tell you what you're doing wrong. All I can say is I had similar difficulties at first. It took forever to get the first version of this to run. I don't think I ever found out why it didn't at first. But I will mention this: Excel has 3 different CSV export formats. Maybe you're not using the right one. I'm pretty sure I use the one that says CSV (Comma delimited) which is redundant since that's what CSV means.

Here's the sample program:



Another useful tidbit... I had to regularly convert data from an Excel workbook (multipage) and the .CSV format makes no allowance for multipage. I found that Excel can export an entire workbook to an XML format that is multipage. And although the Enhancement Pak's XML functions proved absolutely useless, I was able to load the file into my app as a string text file and parse it myself searching for tages like <page> </page> using instr$ functions.

What killed me most about the "enhancements pak" was the fact that the data functions were completely missing from the help file.

Good Luck Guys!

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 27th Jan 2008 02:58 Edited at: 27th Jan 2008 02:59
Quote: "What killed me most about the "enhancements pak" was the fact that the data functions were completely missing from the help file."


Yeah, at first when I bought this pack few years ago these commands where all working normally. Then something changed and on of them was broken. I reported it to Lee and asked also for one additional get data file exists() command. He replied that he has added the command and fixed that problem. But when he released and I downloaded the latest release - this command was not added and the data file commands where completely removed from help files. Like if they where no more supported. I don't know what happened then, but it is like this for more than a year.


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.6b
Vidiot
17
Years of Service
User Offline
Joined: 15th May 2006
Location: TN
Posted: 1st Feb 2008 02:11
I tried If Get data File Exists(1) then print "Its ok". Get Data File Exists() highlights in the editor but wont run. The rest of the functions do seem to work perfectly for me.



I'm pretty sure I have the latest version of the enhancements pack.

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Feb 2008 02:36
I can read from CVS Excel files, but I can only read so much information. I suspect that if the file has too many columns then you're just out of luck. Not matter what I tried I couldn't read past a certain point. I actually spent less time making my own parser with IanM's plugins than I spend screwing around with the Enhancement pack commands, and my parser is better and faster than the commands in the aforementioned plugin.


Come see the WIP!
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd Feb 2008 22:40
^ Cosign! I now use that free XML plugin I posted in this section some time ago.


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.6b

Login to post a reply

Server time is: 2024-05-03 21:21:02
Your offset time is: 2024-05-03 21:21:02