CA VISUAL OBJECTS ORACLE, MS SQL & MY SQL BAĞLANTıSı Suat ÇELİK Mak. Yük. Müh İskenderrun, © Suat ÇELİK
DATABASE FIELD (data11) PERNO ADI SOYADI UNVANI DATABASE FIELD (data12) UNVKOD UNVADI
OPEN & SELECT METHOD PostInit(oWindow, iCtlID, oServer, uExtra) CLASS NewWindow1 LOCAL oSql AS SQLSelect *oConn := SqlConnection("My_MySQL","celik1","1celik") //MySQL oConn := SqlConnection("My_MyOracle","system","manager") //ORACLE *oConn := SqlConnection("My_MSSQL","sa","") //MsSQL IF oConn:Connected oSql := SqlSelect{"Select x.perno, x.adi, x.soyadi, y.unvadi from data11 x, data12 y where x.unvan=y.unvkod order by x.perno",oconn} oSql :=Execute() oDCbBrowser1:Use(oSql) ENDIF RETURN NILL
UPDATE METHOD RepUpd(cPerno, cVeriEski, cVeriYeni, sFieldName) CLASS NewWindow1 LOCAL oStat AS SqlStatement LOCAL cStat as STRING cStat :="update data11 set "+Symbol2string(sFieldName)+"='"+cVeriYeni+"' where perno='"+cPerno+"'" oStat :=Sqlstatement{cStat, oConn} oStat:Exceute() RETURN TRUE
INSERT METHOD RecUpd() CLASS NewWindow1 LOCAL oStat AS SqlStatement LOCAL cStat as STRING LOCAL cP, cA, cS, cU AS STRING cP:="16" cA:="Suat" cS:="Celik" cU:="66" cStat := "insert into data11(perno,adi,soyad,,unvani) Cakues ('"+cP+"','"+cA+"','"+cS+"','"+cU+"')" oStat := Sqlstatement{cStat, oConn} oStat:Execute() RETURN TRUE
DELETE METHOD RecDel() CLASS NewWindow1 LOCAL oStat AS SqlStatement LOCAL cStat as STRING cStat := "delete from data11 where perno='"+cFieldValueSil+"'" oStat := Sqlstatement{cStat, oConn} oStat:Execute() RETURN TRUE