Page 3 of 4

Re: How to search and retrive a value

Posted: Sun Dec 03, 2017 1:58 pm
by esgici
RPC wrote: Sun Dec 03, 2017 7:03 am ...
it is not two cents worth but two million dollar worth of code for me.
Another way of processing text file. I love it.
...
Hi Rajeev

Many thanks to your nice words for me :)

But please do not exaggerate, it was only a humble work for friends :oops:

By the way; if you want we can raise the bar:

for example converting a CSV ( or DSV ;) ) file to .dbf;

what is your opinion ?

Regards

Re: How to search and retrive a value

Posted: Sun Dec 03, 2017 4:59 pm
by jayadevu
Very nice code Esgici.

Warm regards,

Jayadev

Re: How to search and retrive a value

Posted: Sun Dec 03, 2017 5:04 pm
by esgici
jayadevu wrote: Sun Dec 03, 2017 4:59 pm Very nice code Esgici.
...
Thanks Jayadevu;

just your grace :D

Regards

Re: How to search and retrive a value

Posted: Mon Dec 04, 2017 11:27 am
by RPC
esgici wrote: Sun Dec 03, 2017 1:58 pm
RPC wrote: Sun Dec 03, 2017 7:03 am ...
it is not two cents worth but two million dollar worth of code for me.
Another way of processing text file. I love it.
...
Hi Rajeev

Many thanks to your nice words for me :)

But please do not exaggerate, it was only a humble work for friends :oops:

By the way; if you want we can raise the bar:

for example converting a CSV ( or DSV ;) ) file to .dbf;

what is your opinion ?

Regards
Many thanks for offering help to convert from CSV to DBF.
At present I am interested in getting just one value from CSV file.
I will certainly ask in case I am interested in CSV to DBF conversion,
thanks
With Best Wishes

Re: How to search and retrive a value

Posted: Mon Dec 04, 2017 3:01 pm
by esgici
RPC wrote: Mon Dec 04, 2017 11:27 am ...
I will certainly ask in case I am interested in CSV to DBF conversion,
...
OK, I will start,

please remain in line ;)

Regards :D

Re: How to search and retrive a value

Posted: Tue Dec 05, 2017 7:04 am
by RPC

...
please remain in line ;)
...
Ok, I am all eyes and ears. :D

Re: How to search and retrive a value

Posted: Tue Dec 05, 2017 7:10 pm
by franco
rajeev,
I needed this exact situation and I used rat()
you keep shortening the long string until you get to right comma
local a:=0, b:=longstring, c := 'strwanted'
a:= val(substr(b ,rat(c,b)-1
//here you can make your 6 loops.
b:=substr(b,1,a)
a:=val(substr(b,rat(',',b)-1

// this works for me I can find any point in string or field.
regards Franco ;)

Re: How to search and retrive a value

Posted: Wed Dec 06, 2017 10:58 am
by RPC
franco wrote: Tue Dec 05, 2017 7:10 pm rajeev,
I needed this exact situation and I used rat()
you keep shortening the long string until you get to right comma
local a:=0, b:=longstring, c := 'strwanted'
a:= val(substr(b ,rat(c,b)-1
//here you can make your 6 loops.
b:=substr(b,1,a)
a:=val(substr(b,rat(',',b)-1

// this works for me I can find any point in string or field.
regards Franco ;)
Thanks Franco.
I will try and report.

Re: How to search and retrive a value

Posted: Wed Dec 06, 2017 7:44 pm
by esgici
RPC wrote: Mon Dec 04, 2017 11:27 am ...
I am interested in CSV to DBF conversion,
...
Hi Rajeev (and all of course )

As promised:

as name implied ...
as name implied ...
ScreenShotOf_DSV2DBF.prg.jpg (43.28 KiB) Viewed 4064 times
DSV2DBF.zip
DSV2DBF source files and resources
(5.42 KiB) Downloaded 210 times

Please don't forgive my faults :arrow:

Once again:

HMG is a miracle; built by a genius, thousands of fools couldn't break

Viva HMG :D

Re: How to search and retrive a value

Posted: Thu Dec 07, 2017 6:48 pm
by RPC
RPC wrote: Wed Dec 06, 2017 10:58 am Thanks Franco.
I will try and report.
Franco
I tried your code and it works like charm :!: and its so simple :D
Many Thanks
I am really thankful to all those who have helped me in this code.