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

Passing Perintah Sqlexec




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)
SQLExec(nkonmdb,'select * from server','tmp')
cserver = Server
Use In Select('tmp')
lckoneksi ='DRIVER={MySQL ODBC 5.1 Driver};SERVER=;port=3306;DATABASE=;UID=;PWD=;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 ?",4+32, "Informasi")=6
Else
Do out
Endif
Else
Exit
Endif
Enddo
SQLExec(lnkoneksi,"use &xDbf")
IIF(cTipe,SQLExec(lnkoneksi,cSqlstring),SQLExec(lnkoneksi,cSqlstring,cOutput))
Endif
Endproc



0 blog comments below




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