Not: Custom tableda tek row olacaktır db kullanıcı bilgilerini tutacaktır. Dolayısıyla Insert işlemi olmayacaktır.Sadece update olacaktır

.



Sub ButtonClick(ctrl as String)
if ctrl="B_SAVE" then
DbErr=0
CustTables[4].Search(2,2,1)'tek row olacağı için sondaki 1 olmalı ilk logref yani
if DbErr<>0 Then
CustTables[4].NewRecord()
End if
GetTextVal("T_SERVER",T_SERVER)
GetTextVal("T_DB",T_DB)
GetTextVal("T_SQL",T_SQL)
GetTextVal("T_PAROLA",T_PAROLA)
CustTables[4].SetTxtField("SERVER", T_SERVER)
CustTables[4].SetTxtField("DB", T_DB)
CustTables[4].SetTxtField("USERNAME", T_SQL)
CustTables[4].SetTxtField("PASSWORD", T_PAROLA)
DbErr=0
CustTables[4].UpdateRecord()
if DBErr<>0 then
Warn(DBErr)
end if
CloseForm()
end if
End Sub
Sub FormShow()
DbErr=0
CustTables[4].Search(2,2,1)'tek row olacağı için sondaki 1 olmalı ilk logref yani
if DbErr=0 Then
CustTables[4].GetTxtField("SERVER",T_SERVER)
CustTables[4].GetTxtField("DB",T_DB)
CustTables[4].GetTxtField("USERNAME",T_SQL)
CustTables[4].GetTxtField("PASSWORD",T_PAROLA)
end if
SetTextVal("T_SERVER",T_SERVER)
SetTextVal("T_DB",T_DB)
SetTextVal("T_SQL",T_SQL)
SetTextVal("T_PAROLA",T_PAROLA)
End Sub