Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MySQL to dbf
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01139330
Message ID:
01139919
Views:
8
>yeah , the mysqltable has a column named source.. Im trying to select data frm the Mysqltable based on the source field and then insert it into a vfp table that is similar to Mysqltable except that it doesnt have the source field.
>
>the code i posted is the actual code. i guess in the sqlexec function I shouldn't do a "select * from mysqltable". this is wat i was trying to do:
>
>sqlexec(lccon,"select * from mysqltable where source=1","crstest")
>
>then i tried to insert the selected value into the dbf file
>
>insert into dbftable(field1,field2) values (crstest.field1,crstest.field2)

Why ou bother to insert those records in DBF? Why not working directly with crsTest?
If you use
insert into dbftable(field1,field2) values (crstest.field1,crstest.field2)
are you sure you didn't put source somewhere? Becuase you can't get this error if you didn't use source field somewhere.

Try this:

IF sqlexec(lccon,"select * from mysqltable where source=1","crstest") < 0
AERROR(laErr)
MessageBox(laErr[1,2]
RETURN
ENDIF
SELECT CrsTest
BROWSE NORMAL && You must see SOURCE field here
insert into dbftable (field1 ,field2);
values;
(crstest.field1,crstest.field2) && Here check for using SOURCE filed

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform