Koneksi Visual Foxpro ke MySql Server

Untuk mengkoneksikan data ke tabel mysql dapat dilakukan dengan source code di bawah ini :

*DO dbkoneksi
public KoneksiMysql
KoneksiMysql=SQLCONNECT(“dsnakademik”,”akademik”,”warehouseakad2007″)
IF KoneksiMysql<0
MESSAGEBOX(“Koneksi masih gagal…!!!”)
RETURN
ENDIF

MySQLSelect=”SELECT Materi.idmateri, Materi.namamateri, Materi.sks;
FROM ;
materi Materi;
ORDER BY Materi.idmateri”
StatusExec=SQLEXEC(KoneksiMysql,(MySqlselect),”vmateri”)
IF StatusExec<0
MESSAGEBOX(“Eksekusi Script Select ada kesalahan…!”,0,”Konfirmasi”)
RETURN
ENDIF

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s