FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

execute sql




PROCEDURE execute
LPARAMETERS csqlstring, coutput, ctipe
LOCAL nsql
nsql = IIF(ctipe, SQLEXEC(lnkoneksi, csqlstring), SQLEXEC(lnkoneksi, csqlstring, coutput))
IF nsql<0
AERROR(nerr)
nodbcerr = nerr(5)
SQLDISCONNECT(lnkoneksi)
cserver = bacaini("koneksi","server")
lckoneksi ='DRIVER={MySQL ODBC 5.1 Driver};SERVER=&cServer;port=3306;DATABASE=pos;UID=user;PWD=1!2!3!;option=4194304'
DO WHILE .T.
lnkoneksi = SQLSTRINGCONNECT(lckoneksi)
IF lnkoneksi<0
IF MESSAGEBOX("Koneksi ke MYSQL database gagal"+CHR(13)+"Cek Jaringan/Internet Anda"+CHR(13)+"Coba koneksi ulang ?", 036, "Informasi")=6
ELSE
DO out
ENDIF
ELSE
EXIT
ENDIF
ENDDO
SQLEXEC(lnkoneksi,"use &xDbf")
nsql = IIF(ctipe, SQLEXEC(lnkoneksi, csqlstring), SQLEXEC(lnkoneksi, csqlstring, coutput))
ENDIF
RETURN (nsql)
ENDPROC



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.