Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use MySQL in VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
MySQL
Divers
Thread ID:
01007554
Message ID:
01007803
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

Here's an example of inserting a record to an mySql Database.
cDsn="myDSN_NAME" && DSN 
STORE SQLCONNECT('&cDsn','jojo','~lJ@123') TO lnConn
IF lnConn < 0
	MESSAGEBOX("Connection Failed!",0+16,"mySql",1500)
Else
	= SQLSETPROP(lnConn, 'Transactions', 2)
	= SQLEXEC(lnConn, "INSERT INTO TABLE_NAME(FIELD1, FIELD2);
		Values(?memvar1,?memvar2)")
	= SQLCOMMIT(lnConn)
	= SQLDISCONNECT(lnConn)
	MESSAGEBOX("Insert Successful!",0+64,"",1500)
	lSuccess = .T.
ENDIF
Hope it helps..
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform