Has anyone converted a MySql database to a VFP table? I have a guy who
has his database on MySql and would like me to enter it into a VFP
Database table. I have not looked at it yet so do not know what to
expect. Any ideas??
TonySper

Re: MYSQL Database by man-wai

man-wai
Tue Aug 16 10:10:47 CDT 2005

TonySper wrote:
> Has anyone converted a MySql database to a VFP table? I have a guy who
> has his database on MySql and would like me to enter it into a VFP

Thre is MyODBC for Foxpro to talk to MySQL.

--
.~. Might, Courage, Vision. http://www.linux-sxs.org
/ v \
/( _ )\ Linux 2.4.31
^ ^ 11:10pm up 1 day 1:39 load average: 1.97 3.09 2.58

Re: MYSQL Database by Ook

Ook
Tue Aug 16 10:51:22 CDT 2005

Use the mysql odbc driver found on the mysql website. If you create remote
views, be sure to double check the datatypes in the view against the actual
datatypes in the mysql tables, as VFP doesn't always get those right. Once
you get the datatypes right, you can just append the mysql data to a vfp
table. A remote view, for example, works good so long at the mysql table
isn't too big. Then you just copy the view to a VFP table.

"TonySper" <tsperduti@bellsouth.net> wrote in message
news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> Has anyone converted a MySql database to a VFP table? I have a guy who
> has his database on MySql and would like me to enter it into a VFP
> Database table. I have not looked at it yet so do not know what to
> expect. Any ideas??
> TonySper
>
>



Re: MYSQL Database by swdev2

swdev2
Tue Aug 16 13:01:42 CDT 2005

Yo Tony -
1. odbc, if you can. If its across an internet pipe, remember that you can
make an odbc hook via tcp/ip quite easily - see
http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer ready. You
may need to ask 'the guy' to actually give you a newly created
username/password (I ask my clients for this - I don't wanna have their
master stuff ever)
2. make a dump in mysql to csv, then import into vfp as a csv
3. You weren't clear if this was some stand alone server or part of a
shared services hosting provider .
Ask 'yer guy' .

Other stuff -
Typically a mySql DB is a collection of tables, so are you going 1:1 with
one mySql table to one vfp table ? Or are you trying to make aggregrate
Many:One data pulls ?

also - if you get mondo stuck - chat up the folks at
http://groups.yahoo.com/group/vfpmysql
However - the answer to your first question is - SURE ! I have .
The Second Question's Answer - Get More Info.

hth - mondo regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> Has anyone converted a MySql database to a VFP table? I have a guy who
> has his database on MySql and would like me to enter it into a VFP
> Database table. I have not looked at it yet so do not know what to
> expect. Any ideas??
> TonySper
>
>



Re: MYSQL Database by TonySper

TonySper
Tue Aug 16 15:39:52 CDT 2005

I have not seen the table yet but will have it Monday. I hope to just
transfer the data to a VFP Table and use it from there. If I can
convert it to a CSV file it should serve my purpose. I never used
MySql so will have to download it and see what it is about. I will be
getting a CD with just the database. At least that is what he said I
was getting. Will have to wait and look at it. You say there is a
MySql program that will convert the database to CSV?? Can you explain
the dump in MySql to csv??
TonySper

"swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
Yo Tony -
1. odbc, if you can. If its across an internet pipe, remember that
you can
make an odbc hook via tcp/ip quite easily - see
http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer ready.
You
may need to ask 'the guy' to actually give you a newly created
username/password (I ask my clients for this - I don't wanna have
their
master stuff ever)
2. make a dump in mysql to csv, then import into vfp as a csv
3. You weren't clear if this was some stand alone server or part of a
shared services hosting provider .
Ask 'yer guy' .

Other stuff -
Typically a mySql DB is a collection of tables, so are you going 1:1
with
one mySql table to one vfp table ? Or are you trying to make
aggregrate
Many:One data pulls ?

also - if you get mondo stuck - chat up the folks at
http://groups.yahoo.com/group/vfpmysql
However - the answer to your first question is - SURE ! I have .
The Second Question's Answer - Get More Info.

hth - mondo regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> Has anyone converted a MySql database to a VFP table? I have a guy
> who
> has his database on MySql and would like me to enter it into a VFP
> Database table. I have not looked at it yet so do not know what to
> expect. Any ideas??
> TonySper
>
>




Re: MYSQL Database by swdev2

swdev2
Thu Aug 25 02:11:31 CDT 2005

Yo Yo Tony - so ? whats the dealio ?
regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:sasMe.19453$XM3.10284@bignews5.bellsouth.net...
> I have not seen the table yet but will have it Monday. I hope to just
> transfer the data to a VFP Table and use it from there. If I can
> convert it to a CSV file it should serve my purpose. I never used
> MySql so will have to download it and see what it is about. I will be
> getting a CD with just the database. At least that is what he said I
> was getting. Will have to wait and look at it. You say there is a
> MySql program that will convert the database to CSV?? Can you explain
> the dump in MySql to csv??
> TonySper
>
> "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
> Yo Tony -
> 1. odbc, if you can. If its across an internet pipe, remember that
> you can
> make an odbc hook via tcp/ip quite easily - see
> http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer ready.
> You
> may need to ask 'the guy' to actually give you a newly created
> username/password (I ask my clients for this - I don't wanna have
> their
> master stuff ever)
> 2. make a dump in mysql to csv, then import into vfp as a csv
> 3. You weren't clear if this was some stand alone server or part of a
> shared services hosting provider .
> Ask 'yer guy' .
>
> Other stuff -
> Typically a mySql DB is a collection of tables, so are you going 1:1
> with
> one mySql table to one vfp table ? Or are you trying to make
> aggregrate
> Many:One data pulls ?
>
> also - if you get mondo stuck - chat up the folks at
> http://groups.yahoo.com/group/vfpmysql
> However - the answer to your first question is - SURE ! I have .
> The Second Question's Answer - Get More Info.
>
> hth - mondo regards [Bill]
> --
> ===================
> William Sanders / EFG VFP / mySql / MS-SQL
> www.efgroup.net/vfpwebhosting
> www.dotnetconversions.com
> "TonySper" <tsperduti@bellsouth.net> wrote in message
> news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> > Has anyone converted a MySql database to a VFP table? I have a guy
> > who
> > has his database on MySql and would like me to enter it into a VFP
> > Database table. I have not looked at it yet so do not know what to
> > expect. Any ideas??
> > TonySper
> >
> >
>
>
>



Re: MYSQL Database by TonySper

TonySper
Thu Aug 25 14:02:17 CDT 2005

I received the database and looked at it. It sure is wasteful. It has
a enter data for each field before each record spelling out what
fields to enter then it has the data comma delimited. I just used my
editor and eliminated all the entry information and ended up with a
comma delimited txt file after I eliminated the ( and ) after each
line. I then made up a table structure and appended from the text file
delimited. Worked out OK. Properly more work than if I used MYSql and
ran the program to make up a csv file but I did not have MySql and I
would have had to download the program and then learn how to use it.
Since this was a one shot deal I did it the hard way and did not have
to learn (UG UG) another software application.
Thanks for all the input.
TonySper

"swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
news:O$QrWrUqFHA.712@tk2msftngp13.phx.gbl...
Yo Yo Tony - so ? whats the dealio ?
regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:sasMe.19453$XM3.10284@bignews5.bellsouth.net...
> I have not seen the table yet but will have it Monday. I hope to
> just
> transfer the data to a VFP Table and use it from there. If I can
> convert it to a CSV file it should serve my purpose. I never used
> MySql so will have to download it and see what it is about. I will
> be
> getting a CD with just the database. At least that is what he said I
> was getting. Will have to wait and look at it. You say there is a
> MySql program that will convert the database to CSV?? Can you
> explain
> the dump in MySql to csv??
> TonySper
>
> "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
> Yo Tony -
> 1. odbc, if you can. If its across an internet pipe, remember that
> you can
> make an odbc hook via tcp/ip quite easily - see
> http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer
> ready.
> You
> may need to ask 'the guy' to actually give you a newly created
> username/password (I ask my clients for this - I don't wanna have
> their
> master stuff ever)
> 2. make a dump in mysql to csv, then import into vfp as a csv
> 3. You weren't clear if this was some stand alone server or part of
> a
> shared services hosting provider .
> Ask 'yer guy' .
>
> Other stuff -
> Typically a mySql DB is a collection of tables, so are you going 1:1
> with
> one mySql table to one vfp table ? Or are you trying to make
> aggregrate
> Many:One data pulls ?
>
> also - if you get mondo stuck - chat up the folks at
> http://groups.yahoo.com/group/vfpmysql
> However - the answer to your first question is - SURE ! I have .
> The Second Question's Answer - Get More Info.
>
> hth - mondo regards [Bill]
> --
> ===================
> William Sanders / EFG VFP / mySql / MS-SQL
> www.efgroup.net/vfpwebhosting
> www.dotnetconversions.com
> "TonySper" <tsperduti@bellsouth.net> wrote in message
> news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> > Has anyone converted a MySql database to a VFP table? I have a guy
> > who
> > has his database on MySql and would like me to enter it into a VFP
> > Database table. I have not looked at it yet so do not know what to
> > expect. Any ideas??
> > TonySper
> >
> >
>
>
>




Re: MYSQL Database by veiko

veiko
Fri Aug 26 00:15:27 CDT 2005

use tools from http://www.navicat.com/




"swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
news:O$QrWrUqFHA.712@tk2msftngp13.phx.gbl...
> Yo Yo Tony - so ? whats the dealio ?
> regards [Bill]
> --
> ===================
> William Sanders / EFG VFP / mySql / MS-SQL
> www.efgroup.net/vfpwebhosting
> www.dotnetconversions.com
> "TonySper" <tsperduti@bellsouth.net> wrote in message
> news:sasMe.19453$XM3.10284@bignews5.bellsouth.net...
>> I have not seen the table yet but will have it Monday. I hope to just
>> transfer the data to a VFP Table and use it from there. If I can
>> convert it to a CSV file it should serve my purpose. I never used
>> MySql so will have to download it and see what it is about. I will be
>> getting a CD with just the database. At least that is what he said I
>> was getting. Will have to wait and look at it. You say there is a
>> MySql program that will convert the database to CSV?? Can you explain
>> the dump in MySql to csv??
>> TonySper
>>
>> "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
>> news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
>> Yo Tony -
>> 1. odbc, if you can. If its across an internet pipe, remember that
>> you can
>> make an odbc hook via tcp/ip quite easily - see
>> http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer ready.
>> You
>> may need to ask 'the guy' to actually give you a newly created
>> username/password (I ask my clients for this - I don't wanna have
>> their
>> master stuff ever)
>> 2. make a dump in mysql to csv, then import into vfp as a csv
>> 3. You weren't clear if this was some stand alone server or part of a
>> shared services hosting provider .
>> Ask 'yer guy' .
>>
>> Other stuff -
>> Typically a mySql DB is a collection of tables, so are you going 1:1
>> with
>> one mySql table to one vfp table ? Or are you trying to make
>> aggregrate
>> Many:One data pulls ?
>>
>> also - if you get mondo stuck - chat up the folks at
>> http://groups.yahoo.com/group/vfpmysql
>> However - the answer to your first question is - SURE ! I have .
>> The Second Question's Answer - Get More Info.
>>
>> hth - mondo regards [Bill]
>> --
>> ===================
>> William Sanders / EFG VFP / mySql / MS-SQL
>> www.efgroup.net/vfpwebhosting
>> www.dotnetconversions.com
>> "TonySper" <tsperduti@bellsouth.net> wrote in message
>> news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
>> > Has anyone converted a MySql database to a VFP table? I have a guy
>> > who
>> > has his database on MySql and would like me to enter it into a VFP
>> > Database table. I have not looked at it yet so do not know what to
>> > expect. Any ideas??
>> > TonySper
>> >
>> >
>>
>>
>>
>
>



Re: MYSQL Database by Bernhard

Bernhard
Fri Aug 26 04:55:27 CDT 2005

Hi Tony
> I received the database and looked at it. It sure is wasteful. It has
> a enter data for each field before each record spelling out what
> fields to enter then it has the data comma delimited. I just used my
> editor and eliminated all the entry information and ended up with a
> comma delimited txt file after I eliminated the ( and ) after each
> line. I then made up a table structure and appended from the text file
> delimited. Worked out OK. Properly more work than if I used MYSql and
> ran the program to make up a csv file but I did not have MySql and I
> would have had to download the program and then learn how to use it.
> Since this was a one shot deal I did it the hard way and did not have
> to learn (UG UG) another software application.
Sounds as if the file you received was full of INSERT SQL commands.
Maybe you just change the file extension to .prg. Then you create the Fox table
and run this file as normal Fox procedure.

Regards
Bernhard Sander.

Re: MYSQL Database by TonySper

TonySper
Fri Aug 26 15:33:12 CDT 2005

Bernhard,
The following is what was in the file. This was for each record and
there was 3000 records.

INSERT INTO contacts

(contact_id, first_name, last_name, business_title, address_1,
address_2, city, state, postal_code, country, home_phone, bus_phone,
cell_phone, fax_number, e_mail, web, referred, date_stamp, created_by,
notes, admin_accounting, admin_banking, admin_clerical,
admin_computer, admin_directmail, admin_phone, admin_location,
lit_bible, lit_trans, lit_donors, cmat_publishers, cmat_writers,
cmat_printers, cmat_wp, cmat_graphic, cmat_sponser, cmat_css,
cmat_marketing, cwork_member, cwork_commit, cwork_prospect, cmen_fl,
cmen_strang, cm_pk, cm_location, church_location, churches, ev_films,
ev_org, ev_ev, ev_mat, fin_month, fin_other, great_com, inv_partners,
ministry, music, para_church, prayer, radio_tv, resources,
scm_commitee, sm_gender, sm_churches, sm_location, tape_members,
tape_prospects, tape_billing, tape_location, training, training_alum,
training_location, training_para, training_gc, training_prospect)

VALUES

(1, "John", "Prosser", "CAT III Systems, Inc.", "3022 Oak Hammock
Drive", "", "Port Orange", "FL", "32129", "US", "386 767-8928", "386
788-9404", "", "", "jprosser@catiii.com", "http://www.catiii.com", "",
"4/22/2003 16:25:45", "JP", "Test", "N", "N", "N", "N", "N", "N",
"None", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",
"N", "N", "N", "N", "N", "None", "None", "United Methodist", "N", "N",
"N", "N", "N", "None", "None", "None", "N", "None", "None", "None",
"None", "None", "None", "None", "N", "None", "N", "N", "None", "None",
"None", "N", "None", "N", "N", "N");



This was for the 1st record. Just think of 2999 more like that.

TonySper
















"Bernhard Sander" <fuchs@individsoft.de> wrote in message
news:%23zGLKRiqFHA.1336@TK2MSFTNGP11.phx.gbl...
Hi Tony
> I received the database and looked at it. It sure is wasteful. It
> has
> a enter data for each field before each record spelling out what
> fields to enter then it has the data comma delimited. I just used my
> editor and eliminated all the entry information and ended up with a
> comma delimited txt file after I eliminated the ( and ) after each
> line. I then made up a table structure and appended from the text
> file
> delimited. Worked out OK. Properly more work than if I used MYSql
> and
> ran the program to make up a csv file but I did not have MySql and I
> would have had to download the program and then learn how to use it.
> Since this was a one shot deal I did it the hard way and did not
> have
> to learn (UG UG) another software application.
Sounds as if the file you received was full of INSERT SQL commands.
Maybe you just change the file extension to .prg. Then you create the
Fox table
and run this file as normal Fox procedure.

Regards
Bernhard Sander.



Re: MYSQL Database by Dan

Dan
Fri Aug 26 15:50:40 CDT 2005

Given a dbf named contacts with a structure matching that, all you'd need is
to resolve line continuation and run that prg as is.

Dan

TonySper wrote:
> Bernhard,
> The following is what was in the file. This was for each record and
> there was 3000 records.
>
> INSERT INTO contacts
>
> (contact_id, first_name, last_name, business_title, address_1,
> address_2, city, state, postal_code, country, home_phone, bus_phone,
> cell_phone, fax_number, e_mail, web, referred, date_stamp, created_by,
> notes, admin_accounting, admin_banking, admin_clerical,
> admin_computer, admin_directmail, admin_phone, admin_location,
> lit_bible, lit_trans, lit_donors, cmat_publishers, cmat_writers,
> cmat_printers, cmat_wp, cmat_graphic, cmat_sponser, cmat_css,
> cmat_marketing, cwork_member, cwork_commit, cwork_prospect, cmen_fl,
> cmen_strang, cm_pk, cm_location, church_location, churches, ev_films,
> ev_org, ev_ev, ev_mat, fin_month, fin_other, great_com, inv_partners,
> ministry, music, para_church, prayer, radio_tv, resources,
> scm_commitee, sm_gender, sm_churches, sm_location, tape_members,
> tape_prospects, tape_billing, tape_location, training, training_alum,
> training_location, training_para, training_gc, training_prospect)
>
> VALUES
>
> (1, "John", "Prosser", "CAT III Systems, Inc.", "3022 Oak Hammock
> Drive", "", "Port Orange", "FL", "32129", "US", "386 767-8928", "386
> 788-9404", "", "", "jprosser@catiii.com", "http://www.catiii.com", "",
> "4/22/2003 16:25:45", "JP", "Test", "N", "N", "N", "N", "N", "N",
> "None", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",
> "N", "N", "N", "N", "N", "None", "None", "United Methodist", "N", "N",
> "N", "N", "N", "None", "None", "None", "N", "None", "None", "None",
> "None", "None", "None", "None", "N", "None", "N", "N", "None", "None",
> "None", "N", "None", "N", "N", "N");
>
>
>
> This was for the 1st record. Just think of 2999 more like that.
>
> TonySper
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Bernhard Sander" <fuchs@individsoft.de> wrote in message
> news:%23zGLKRiqFHA.1336@TK2MSFTNGP11.phx.gbl...
> Hi Tony
>> I received the database and looked at it. It sure is wasteful. It
>> has
>> a enter data for each field before each record spelling out what
>> fields to enter then it has the data comma delimited. I just used my
>> editor and eliminated all the entry information and ended up with a
>> comma delimited txt file after I eliminated the ( and ) after each
>> line. I then made up a table structure and appended from the text
>> file
>> delimited. Worked out OK. Properly more work than if I used MYSql
>> and
>> ran the program to make up a csv file but I did not have MySql and I
>> would have had to download the program and then learn how to use it.
>> Since this was a one shot deal I did it the hard way and did not
>> have
>> to learn (UG UG) another software application.
> Sounds as if the file you received was full of INSERT SQL commands.
> Maybe you just change the file extension to .prg. Then you create the
> Fox table
> and run this file as normal Fox procedure.
>
> Regards
> Bernhard Sander.



Re: MYSQL Database by Bernhard

Bernhard
Fri Aug 26 15:59:46 CDT 2005

Hi Tony

> INSERT INTO contacts ...
Yes, this is a clean INSERT SQL command. Foxpro understands this, if you delete
the ; at the end of each line. There are simply 3000 of these commands in your
file.
All fields in the target fox table must be of type C.

Regards
Bernhard Sander

SV: MYSQL Database by Anders

Anders
Sat Aug 27 04:39:51 CDT 2005

The only problem is line continuation, but you could work around that by
removing all the ; (they are SQL end-of-command tokens) and all the
chr(13)+CHR(10) , then insert a CHR(13)+CHR(10) in front of each INSERT
? OCCURS(CHR(13),lcSQL)
? OCCURS(CHR(10), lcSQL)
lcSQL=FILETOSTR('mysql.txt')
lcSQL=CHRTRAN(lcSQL';','')
lcSQL=CHRTRAN(lcSQL, CHR(13)+CHR(10),'')
lcSQL=STRTRAN(lcSQL,'INSERT ',CHR(13)+CHR(10)+'INSERT '
You should now have 3000 lines of code some 25*60 chars long.
Run the code
&lcSQL
or use STRTOFILE(lcSQL,'Newprog.prg') to write it into a prg file you can
call.

-Anders

Den 05-08-26 22.34, i artikeln c0LPe.3441$7F.638@bignews3.bellsouth.net,
skrev "TonySper" <tsperduti@bellsouth.net>:

> Bernhard,
> The following is what was in the file. This was for each record and
> there was 3000 records.
>
> INSERT INTO contacts
>
> (contact_id, first_name, last_name, business_title, address_1,
> address_2, city, state, postal_code, country, home_phone, bus_phone,
> cell_phone, fax_number, e_mail, web, referred, date_stamp, created_by,
> notes, admin_accounting, admin_banking, admin_clerical,
> admin_computer, admin_directmail, admin_phone, admin_location,
> lit_bible, lit_trans, lit_donors, cmat_publishers, cmat_writers,
> cmat_printers, cmat_wp, cmat_graphic, cmat_sponser, cmat_css,
> cmat_marketing, cwork_member, cwork_commit, cwork_prospect, cmen_fl,
> cmen_strang, cm_pk, cm_location, church_location, churches, ev_films,
> ev_org, ev_ev, ev_mat, fin_month, fin_other, great_com, inv_partners,
> ministry, music, para_church, prayer, radio_tv, resources,
> scm_commitee, sm_gender, sm_churches, sm_location, tape_members,
> tape_prospects, tape_billing, tape_location, training, training_alum,
> training_location, training_para, training_gc, training_prospect)
>
> VALUES
>
> (1, "John", "Prosser", "CAT III Systems, Inc.", "3022 Oak Hammock
> Drive", "", "Port Orange", "FL", "32129", "US", "386 767-8928", "386
> 788-9404", "", "", "jprosser@catiii.com", "http://www.catiii.com", "",
> "4/22/2003 16:25:45", "JP", "Test", "N", "N", "N", "N", "N", "N",
> "None", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",
> "N", "N", "N", "N", "N", "None", "None", "United Methodist", "N", "N",
> "N", "N", "N", "None", "None", "None", "N", "None", "None", "None",
> "None", "None", "None", "None", "N", "None", "N", "N", "None", "None",
> "None", "N", "None", "N", "N", "N");
>
>
>
> This was for the 1st record. Just think of 2999 more like that.
>
> TonySper
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Bernhard Sander" <fuchs@individsoft.de> wrote in message
> news:%23zGLKRiqFHA.1336@TK2MSFTNGP11.phx.gbl...
> Hi Tony
>> I received the database and looked at it. It sure is wasteful. It
>> has
>> a enter data for each field before each record spelling out what
>> fields to enter then it has the data comma delimited. I just used my
>> editor and eliminated all the entry information and ended up with a
>> comma delimited txt file after I eliminated the ( and ) after each
>> line. I then made up a table structure and appended from the text
>> file
>> delimited. Worked out OK. Properly more work than if I used MYSql
>> and
>> ran the program to make up a csv file but I did not have MySql and I
>> would have had to download the program and then learn how to use it.
>> Since this was a one shot deal I did it the hard way and did not
>> have
>> to learn (UG UG) another software application.
> Sounds as if the file you received was full of INSERT SQL commands.
> Maybe you just change the file extension to .prg. Then you create the
> Fox table
> and run this file as normal Fox procedure.
>
> Regards
> Bernhard Sander.
>
>


Re: MYSQL Database by TonySper

TonySper
Sun Aug 28 18:05:19 CDT 2005

Thank you all for the help. To bad I did it the hard way as I
eliminated all the insert instructions, took out the ( in front of
each line and the ) at end of each line and then just appended it
delaminated and it worked out fine.
TonySper


"Anders" <anders.altberg@telia.com> wrote in message
news:BF360187.2887%anders.altberg@telia.com...
The only problem is line continuation, but you could work around that
by
removing all the ; (they are SQL end-of-command tokens) and all the
chr(13)+CHR(10) , then insert a CHR(13)+CHR(10) in front of each
INSERT
? OCCURS(CHR(13),lcSQL)
? OCCURS(CHR(10), lcSQL)
lcSQL=FILETOSTR('mysql.txt')
lcSQL=CHRTRAN(lcSQL';','')
lcSQL=CHRTRAN(lcSQL, CHR(13)+CHR(10),'')
lcSQL=STRTRAN(lcSQL,'INSERT ',CHR(13)+CHR(10)+'INSERT '
You should now have 3000 lines of code some 25*60 chars long.
Run the code
&lcSQL
or use STRTOFILE(lcSQL,'Newprog.prg') to write it into a prg file you
can
call.

-Anders

Den 05-08-26 22.34, i artikeln
c0LPe.3441$7F.638@bignews3.bellsouth.net,
skrev "TonySper" <tsperduti@bellsouth.net>:

> Bernhard,
> The following is what was in the file. This was for each record and
> there was 3000 records.
>
> INSERT INTO contacts
>
> (contact_id, first_name, last_name, business_title, address_1,
> address_2, city, state, postal_code, country, home_phone, bus_phone,
> cell_phone, fax_number, e_mail, web, referred, date_stamp,
> created_by,
> notes, admin_accounting, admin_banking, admin_clerical,
> admin_computer, admin_directmail, admin_phone, admin_location,
> lit_bible, lit_trans, lit_donors, cmat_publishers, cmat_writers,
> cmat_printers, cmat_wp, cmat_graphic, cmat_sponser, cmat_css,
> cmat_marketing, cwork_member, cwork_commit, cwork_prospect, cmen_fl,
> cmen_strang, cm_pk, cm_location, church_location, churches,
> ev_films,
> ev_org, ev_ev, ev_mat, fin_month, fin_other, great_com,
> inv_partners,
> ministry, music, para_church, prayer, radio_tv, resources,
> scm_commitee, sm_gender, sm_churches, sm_location, tape_members,
> tape_prospects, tape_billing, tape_location, training,
> training_alum,
> training_location, training_para, training_gc, training_prospect)
>
> VALUES
>
> (1, "John", "Prosser", "CAT III Systems, Inc.", "3022 Oak Hammock
> Drive", "", "Port Orange", "FL", "32129", "US", "386 767-8928", "386
> 788-9404", "", "", "jprosser@catiii.com", "http://www.catiii.com",
> "",
> "4/22/2003 16:25:45", "JP", "Test", "N", "N", "N", "N", "N", "N",
> "None", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",
> "N", "N", "N", "N", "N", "None", "None", "United Methodist", "N",
> "N",
> "N", "N", "N", "None", "None", "None", "N", "None", "None", "None",
> "None", "None", "None", "None", "N", "None", "N", "N", "None",
> "None",
> "None", "N", "None", "N", "N", "N");
>
>
>
> This was for the 1st record. Just think of 2999 more like that.
>
> TonySper
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Bernhard Sander" <fuchs@individsoft.de> wrote in message
> news:%23zGLKRiqFHA.1336@TK2MSFTNGP11.phx.gbl...
> Hi Tony
>> I received the database and looked at it. It sure is wasteful. It
>> has
>> a enter data for each field before each record spelling out what
>> fields to enter then it has the data comma delimited. I just used
>> my
>> editor and eliminated all the entry information and ended up with a
>> comma delimited txt file after I eliminated the ( and ) after each
>> line. I then made up a table structure and appended from the text
>> file
>> delimited. Worked out OK. Properly more work than if I used MYSql
>> and
>> ran the program to make up a csv file but I did not have MySql and
>> I
>> would have had to download the program and then learn how to use
>> it.
>> Since this was a one shot deal I did it the hard way and did not
>> have
>> to learn (UG UG) another software application.
> Sounds as if the file you received was full of INSERT SQL commands.
> Maybe you just change the file extension to .prg. Then you create
> the
> Fox table
> and run this file as normal Fox procedure.
>
> Regards
> Bernhard Sander.
>
>



Re: MYSQL Database by swdev2

swdev2
Mon Aug 29 05:55:40 CDT 2005

Yo Yo Tony -
ya - thats the SQL commands to do the record inserts .
whilst some view it as junk -
you can change it programmatically once, and it works with vfp natively.
its not a hard thing, either .
so - it sounds like wot u got was the entire sql dump from the client
and NOT
a csv file

regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:c0LPe.3441$7F.638@bignews3.bellsouth.net...
> Bernhard,
> The following is what was in the file. This was for each record and
> there was 3000 records.
>
> INSERT INTO contacts
>
> (contact_id, first_name, last_name, business_title, address_1,
> address_2, city, state, postal_code, country, home_phone, bus_phone,
> cell_phone, fax_number, e_mail, web, referred, date_stamp, created_by,
> notes, admin_accounting, admin_banking, admin_clerical,
> admin_computer, admin_directmail, admin_phone, admin_location,
> lit_bible, lit_trans, lit_donors, cmat_publishers, cmat_writers,
> cmat_printers, cmat_wp, cmat_graphic, cmat_sponser, cmat_css,
> cmat_marketing, cwork_member, cwork_commit, cwork_prospect, cmen_fl,
> cmen_strang, cm_pk, cm_location, church_location, churches, ev_films,
> ev_org, ev_ev, ev_mat, fin_month, fin_other, great_com, inv_partners,
> ministry, music, para_church, prayer, radio_tv, resources,
> scm_commitee, sm_gender, sm_churches, sm_location, tape_members,
> tape_prospects, tape_billing, tape_location, training, training_alum,
> training_location, training_para, training_gc, training_prospect)
>
> VALUES
>
> (1, "John", "Prosser", "CAT III Systems, Inc.", "3022 Oak Hammock
> Drive", "", "Port Orange", "FL", "32129", "US", "386 767-8928", "386
> 788-9404", "", "", "jprosser@catiii.com", "http://www.catiii.com", "",
> "4/22/2003 16:25:45", "JP", "Test", "N", "N", "N", "N", "N", "N",
> "None", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N",
> "N", "N", "N", "N", "N", "None", "None", "United Methodist", "N", "N",
> "N", "N", "N", "None", "None", "None", "N", "None", "None", "None",
> "None", "None", "None", "None", "N", "None", "N", "N", "None", "None",
> "None", "N", "None", "N", "N", "N");
>
>
>
> This was for the 1st record. Just think of 2999 more like that.
>
> TonySper
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Bernhard Sander" <fuchs@individsoft.de> wrote in message
> news:%23zGLKRiqFHA.1336@TK2MSFTNGP11.phx.gbl...
> Hi Tony
> > I received the database and looked at it. It sure is wasteful. It
> > has
> > a enter data for each field before each record spelling out what
> > fields to enter then it has the data comma delimited. I just used my
> > editor and eliminated all the entry information and ended up with a
> > comma delimited txt file after I eliminated the ( and ) after each
> > line. I then made up a table structure and appended from the text
> > file
> > delimited. Worked out OK. Properly more work than if I used MYSql
> > and
> > ran the program to make up a csv file but I did not have MySql and I
> > would have had to download the program and then learn how to use it.
> > Since this was a one shot deal I did it the hard way and did not
> > have
> > to learn (UG UG) another software application.
> Sounds as if the file you received was full of INSERT SQL commands.
> Maybe you just change the file extension to .prg. Then you create the
> Fox table
> and run this file as normal Fox procedure.
>
> Regards
> Bernhard Sander.
>
>



Re: MYSQL Database by swdev2

swdev2
Mon Aug 29 09:02:03 CDT 2005

In hindsight - I would say:
1. golly - if you had showed us the stuff on Monday perhaps we could have
saved you LOADS of time.
2. you don't have yer own instance of mysql running ? if you did - you
could have dumped that sql file
into mysql via myphpadmin, for example, and then done spt via odbc from vfp
to get the data.
3. why not try an integrated WAMP solution for mysql on wintel ? see
http://www.foxserv.net/ and d/l then install version 3.
4. ya - some ppl don't think sql is part of Visual FoxPro. As you've
learned recently -that's not the case.
Anders put forth an elegant solution in less than 40 lines of code that
would have FIXED YOU in about 12 minutes. Had you had it on 'that Monday' -
and actually used it - it would have saved you the rest of the week, and
imnsho, entitled Anders to a nice consultant fee from your firm for saving
your time (and backside)
5. Next Time? You Get another 'Monday Deliverable for a db file' ? Let us
know on that Monday, and perhaps we save you loads of time.
6. When you read, "also - if you get mondo stuck - chat up the folks at
http://groups.yahoo.com/group/vfpmysql ", - what did you do ?

a question - do you have any budget for paying for support from your company
?
regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:ZAoPe.414$HM2.194@bignews5.bellsouth.net...
> I received the database and looked at it. It sure is wasteful. It has
> a enter data for each field before each record spelling out what
> fields to enter then it has the data comma delimited. I just used my
> editor and eliminated all the entry information and ended up with a
> comma delimited txt file after I eliminated the ( and ) after each
> line. I then made up a table structure and appended from the text file
> delimited. Worked out OK. Properly more work than if I used MYSql and
> ran the program to make up a csv file but I did not have MySql and I
> would have had to download the program and then learn how to use it.
> Since this was a one shot deal I did it the hard way and did not have
> to learn (UG UG) another software application.
> Thanks for all the input.
> TonySper
>
> "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> news:O$QrWrUqFHA.712@tk2msftngp13.phx.gbl...
> Yo Yo Tony - so ? whats the dealio ?
> regards [Bill]
> --
> ===================
> William Sanders / EFG VFP / mySql / MS-SQL
> www.efgroup.net/vfpwebhosting
> www.dotnetconversions.com
> "TonySper" <tsperduti@bellsouth.net> wrote in message
> news:sasMe.19453$XM3.10284@bignews5.bellsouth.net...
> > I have not seen the table yet but will have it Monday. I hope to
> > just
> > transfer the data to a VFP Table and use it from there. If I can
> > convert it to a CSV file it should serve my purpose. I never used
> > MySql so will have to download it and see what it is about. I will
> > be
> > getting a CD with just the database. At least that is what he said I
> > was getting. Will have to wait and look at it. You say there is a
> > MySql program that will convert the database to CSV?? Can you
> > explain
> > the dump in MySql to csv??
> > TonySper
> >
> > "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> > news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
> > Yo Tony -
> > 1. odbc, if you can. If its across an internet pipe, remember that
> > you can
> > make an odbc hook via tcp/ip quite easily - see
> > http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer
> > ready.
> > You
> > may need to ask 'the guy' to actually give you a newly created
> > username/password (I ask my clients for this - I don't wanna have
> > their
> > master stuff ever)
> > 2. make a dump in mysql to csv, then import into vfp as a csv
> > 3. You weren't clear if this was some stand alone server or part of
> > a
> > shared services hosting provider .
> > Ask 'yer guy' .
> >
> > Other stuff -
> > Typically a mySql DB is a collection of tables, so are you going 1:1
> > with
> > one mySql table to one vfp table ? Or are you trying to make
> > aggregrate
> > Many:One data pulls ?
> >
> > also - if you get mondo stuck - chat up the folks at
> > http://groups.yahoo.com/group/vfpmysql
> > However - the answer to your first question is - SURE ! I have .
> > The Second Question's Answer - Get More Info.
> >
> > hth - mondo regards [Bill]
> > --
> > ===================
> > William Sanders / EFG VFP / mySql / MS-SQL
> > www.efgroup.net/vfpwebhosting
> > www.dotnetconversions.com
> > "TonySper" <tsperduti@bellsouth.net> wrote in message
> > news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> > > Has anyone converted a MySql database to a VFP table? I have a guy
> > > who
> > > has his database on MySql and would like me to enter it into a VFP
> > > Database table. I have not looked at it yet so do not know what to
> > > expect. Any ideas??
> > > TonySper




Re: MYSQL Database by TonySper

TonySper
Tue Aug 30 09:40:12 CDT 2005

Thanks for the suggestions and the help. I think and hope this was
just a one time job on this data. Of course you never know what's
around the corner. Will look into your thoughts. I am an independent
programmer and thanks for that as after I look at my abilities I would
have to fire myself. I still plod along using mostly old code that I
never broke myself free from. If it were not for this news group I
would be lost.
TonySper

"swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
news:u$x93HKrFHA.2604@TK2MSFTNGP14.phx.gbl...
In hindsight - I would say:
1. golly - if you had showed us the stuff on Monday perhaps we could
have
saved you LOADS of time.
2. you don't have yer own instance of mysql running ? if you did -
you
could have dumped that sql file
into mysql via myphpadmin, for example, and then done spt via odbc
from vfp
to get the data.
3. why not try an integrated WAMP solution for mysql on wintel ? see
http://www.foxserv.net/ and d/l then install version 3.
4. ya - some ppl don't think sql is part of Visual FoxPro. As you've
learned recently -that's not the case.
Anders put forth an elegant solution in less than 40 lines of code
that
would have FIXED YOU in about 12 minutes. Had you had it on 'that
Monday' -
and actually used it - it would have saved you the rest of the week,
and
imnsho, entitled Anders to a nice consultant fee from your firm for
saving
your time (and backside)
5. Next Time? You Get another 'Monday Deliverable for a db file' ?
Let us
know on that Monday, and perhaps we save you loads of time.
6. When you read, "also - if you get mondo stuck - chat up the folks
at
http://groups.yahoo.com/group/vfpmysql ", - what did you do ?

a question - do you have any budget for paying for support from your
company
?
regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"TonySper" <tsperduti@bellsouth.net> wrote in message
news:ZAoPe.414$HM2.194@bignews5.bellsouth.net...
> I received the database and looked at it. It sure is wasteful. It
> has
> a enter data for each field before each record spelling out what
> fields to enter then it has the data comma delimited. I just used my
> editor and eliminated all the entry information and ended up with a
> comma delimited txt file after I eliminated the ( and ) after each
> line. I then made up a table structure and appended from the text
> file
> delimited. Worked out OK. Properly more work than if I used MYSql
> and
> ran the program to make up a csv file but I did not have MySql and I
> would have had to download the program and then learn how to use it.
> Since this was a one shot deal I did it the hard way and did not
> have
> to learn (UG UG) another software application.
> Thanks for all the input.
> TonySper
>
> "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> news:O$QrWrUqFHA.712@tk2msftngp13.phx.gbl...
> Yo Yo Tony - so ? whats the dealio ?
> regards [Bill]
> --
> ===================
> William Sanders / EFG VFP / mySql / MS-SQL
> www.efgroup.net/vfpwebhosting
> www.dotnetconversions.com
> "TonySper" <tsperduti@bellsouth.net> wrote in message
> news:sasMe.19453$XM3.10284@bignews5.bellsouth.net...
> > I have not seen the table yet but will have it Monday. I hope to
> > just
> > transfer the data to a VFP Table and use it from there. If I can
> > convert it to a CSV file it should serve my purpose. I never used
> > MySql so will have to download it and see what it is about. I will
> > be
> > getting a CD with just the database. At least that is what he said
> > I
> > was getting. Will have to wait and look at it. You say there is a
> > MySql program that will convert the database to CSV?? Can you
> > explain
> > the dump in MySql to csv??
> > TonySper
> >
> > "swdev2" <wsanders@dotnetconversions.bob.com> wrote in message
> > news:%23BrKLxooFHA.2472@TK2MSFTNGP15.phx.gbl...
> > Yo Tony -
> > 1. odbc, if you can. If its across an internet pipe, remember
> > that
> > you can
> > make an odbc hook via tcp/ip quite easily - see
> > http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP when yer
> > ready.
> > You
> > may need to ask 'the guy' to actually give you a newly created
> > username/password (I ask my clients for this - I don't wanna have
> > their
> > master stuff ever)
> > 2. make a dump in mysql to csv, then import into vfp as a csv
> > 3. You weren't clear if this was some stand alone server or part
> > of
> > a
> > shared services hosting provider .
> > Ask 'yer guy' .
> >
> > Other stuff -
> > Typically a mySql DB is a collection of tables, so are you going
> > 1:1
> > with
> > one mySql table to one vfp table ? Or are you trying to make
> > aggregrate
> > Many:One data pulls ?
> >
> > also - if you get mondo stuck - chat up the folks at
> > http://groups.yahoo.com/group/vfpmysql
> > However - the answer to your first question is - SURE ! I have .
> > The Second Question's Answer - Get More Info.
> >
> > hth - mondo regards [Bill]
> > --
> > ===================
> > William Sanders / EFG VFP / mySql / MS-SQL
> > www.efgroup.net/vfpwebhosting
> > www.dotnetconversions.com
> > "TonySper" <tsperduti@bellsouth.net> wrote in message
> > news:oinMe.18928$Rm3.1735@bignews4.bellsouth.net...
> > > Has anyone converted a MySql database to a VFP table? I have a
> > > guy
> > > who
> > > has his database on MySql and would like me to enter it into a
> > > VFP
> > > Database table. I have not looked at it yet so do not know what
> > > to
> > > expect. Any ideas??
> > > TonySper