Forum Moderators: phranque

Message Too Old, No Replies

problem with .csv file and bespoke software.help?

         

martin1973

1:49 pm on Sep 16, 2007 (gmt 0)

10+ Year Member



Hi

Hope im posting in the correct area, its website related.

one of my websites is www.lakesandvalleys.co.uk not the best designed or written site (not my work) and a few years ago i had some bespoke software designed to allow me to update the content on the pages (text, photos, prices) the layout remaining untouched.

Im not that clued up on web design - tend to butcher pages - cut and paste here, add an image there etc.

Anyway as far as I can make out the software uses a .csv file to update the information which in turn updates the html file for that page within the folder on my PC. The software has developed a run time error 5, it works ok on laptop but not on PC.

If anyones able to help maybe easier to email the file rather than try and explain where i think the problem lies - as its a field i dont really know what im talking about :)

martin1973

2:11 pm on Sep 16, 2007 (gmt 0)

10+ Year Member



Forgot to say the csv file is called site.csv but I click on a program icon called webupdate which is a TASC file when i actually launch the program.

Think the main files which get things up and running are

site.csv
webupdate.bas
webupdate.frx
webupdate.vbw
webupdate.frm
webupdate.vbp
and the webupdate icon shown as TASC

The other files in the folder are images and html files of the web pages which are altered and updated via the above - hopefully this info might make the mud a little clearer!

jtara

4:15 pm on Sep 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a Visual Basic program. Runtime Error 5 is typically an error in passing a parameter.

My guess is that you've entered some data that is somehow "out of bounds". for the program e.g. too long, wrong type, etc. and the program itself doesn't check the data carefully (or at all) and so didn't (couldn't) issue a more-specific error message.

Not sure why it would work on one machine and fail on another, except that you might have been processing different data.

martin1973

4:22 pm on Sep 16, 2007 (gmt 0)

10+ Year Member



think that would make sense about inputting data wrong, but cant fix the .csv file, can see where it looks to be wrong in the basic text but have tried all sorts and no joy - out of my depth to be fair. Apart from this software my skills of web design tend to be tweaking a bit of existing html ie different email address, image, extra paragraph etc.

Anybody out there fancy taking a look at the file?

jtara

5:07 pm on Sep 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



think that would make sense about inputting data wrong, but cant fix the .csv file

Well, you are about to learn one of the most basic of debugging techniques - "partitioning".

Delete half of the lines in the .csv file. Does it still fail? Delete half again. Eventually (hopefully) you will get to a point where it work. Start adding in lines.

When it blows up, you've gotten to the line that is causing the problem. Now, how to fix it?

Here's one way:

"Doctor, doctor, it hurts when I do this"
"So, don't do that!"

The other way would be to hire a VB programmer to look into why it is failing, and correct it. I can't speculate on what the correction would involve - it could be very simple, or could require a major rewrite of the program.

martin1973

5:12 pm on Sep 16, 2007 (gmt 0)

10+ Year Member



Would you be prepared and oh so kind enough (kisses feet) to take a look at the file? would you need just the csv file or the files that work the program?

martin1973

9:38 am on Sep 17, 2007 (gmt 0)

10+ Year Member



luckily the designer has actually got back in touch (almost fell off chair) fixed one run time error, now developed another, hopefully he will get it sorted though

piatkow

4:20 pm on Sep 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



May be a red herring but the first thing to check in a csv is that all lines have the correct number of commas.

In a similar but non web related issue I run a csv based update to a system every Monday morning. Most usual cause of problems is a null value at the end of the line resulting in one comma too few. Second most common problem is a field that should be in quotes not having any.

martin1973

4:59 pm on Sep 17, 2007 (gmt 0)

10+ Year Member



designer has been in touch and will fix for smallish fee - one of problems was when cutting and pasting text i pasted in the character " which caused problems

piatkow

8:45 am on Sep 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That was the third most common problem :)