Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert data via SQLexec
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Insert data via SQLexec
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01521368
Message ID:
01521368
Views:
106
How can I insert data from my_local_table.dbf to my_remote_sql_table using SQLexec ?

Please help me to complete the code below:
thisform.status.Value = "Connecting..."
thisform.status.BackColor = RGB(232,255,232)

WAIT WINDOW TIMEOUT 1

lcServer="siteground150.com"
lcPort= 3306
lcDatabase= "monitorr_acrisoft"
lcUser= "monitorr_******"
lcPassword="**********"
lcStringConn="Driver={MySQL ODBC 5.1 Driver};Server=&lcServer;Port=lcPort;Option=16384;Stmt=;Database=&lcDatabase;Uid=&lcUser;Pwd=&lcPassword"

SQLSETPROP(0,"DispLogin",1)

thisform.status.BackColor = RGB(255,242,236)

lnHandle=SQLSTRINGCONNECT(lcStringConn)
thisform.status.Value = "Connected."
thisform.status.BackColor = RGB(255,232,221)


*****************************************************below I need the code to: ***********************************************

use my_local_table
  
     scan for my_local_table.control = .F. 

* insert   my_local_table.name, my_local_table.address into  my_remote_sql_table.name, address...

* if insert is successful
   replace my_local_table.control with .T.

endscan

  
Next
Reply
Map
View

Click here to load this message in the networking platform