Forum OpenACS Q&A: Re: Re: Re: Re: Excel Spreadheet X Postgresql

Collapse
Posted by Iuri Sampaio on
hi claudio,

i just finished my script to import the data from a cvs file. I'm on the tcl file right now and i have no clue how i will run it. from the browser?? from where???

sorry for my delay

Collapse
Posted by Claudio Pasolini on
i just finished my script to import the data from a cvs file. I'm on the tcl file right now and i have no clue how i will run it. from the browser?

Yes

from where?
As already said, you can put your script almost anywhere under the service root, e.g. in the www directory of your package

Collapse
Posted by Iuri Sampaio on
sorry, i didn't express myself well. the question should be how do i run the script? Do i need an adp file?
if so...what should be in the adp file??

i'm asking because sometimes on oacs i waste too much time doing things that was totaly unnecessary and there was a way out a lot quickly. or even details that i don't know.for example the sql files always need to be reload if i do change something on it.

thanks

Collapse
Posted by Iuri Sampaio on
Claudio,

i got the script quite working. It's missing just to test on the real db.

sorry for the dumbest question about how to run the script. But OACS sometimes drives me crazy with few detaisls and i end up wasting too much time on easy little things that i didn't even tought it was needed

anyway, i'm learning and i believe this is a process that takes time whem we talk about OACS

Collapse
Posted by Claudio Pasolini on
Hi Iuri,

the easyest way to run your script is to fire it from your browser. You could also run it from the Tcl shell, but only if you don't use any Aolserver or OpenACS API.

You can write a message confirming that the script has finished, along with some statistics, both with an ADP page or with a simple ns_return command, at your choice.

Collapse
Posted by Iuri Sampaio on
Hi Claudio,

i run the script and it's working fine, I mean the data has been inserted.
The only problem is some data comes with " or missplaced. I'm quite sure it's because of there's something wrong in the csv file.

Is there another way to get a good csv file??

Collapse
Posted by Iuri Sampaio on
take a look on the data inserted. There's " and misplaced info

http://www.myybiz.net:8090/master-contacts/list-contacts