edit,hapus,simpan foxpro

contoh tabel

contoh tabel

command “click” pada simpan

*STORE SQLSTRINGCONNECT (“DRIVER=SQL SERVER;DATABASE=simakda_kalbar;UID=SA;PWD=SA;SERVER=(LOCAL)”) TO A
Store Sqlstringconnect(“dsn=Test;uid=sa;pwd=”) To a

MESSAGEBOX(a)
kode=thisform.text1.Value
nama=thisform.text2.Value
lama=thisform.text3.Value

E = SQLEXEC(A,”INSERT INTO Jabatan(Kd_jabatan,Nama_jabatan,Lama_kontrak) VALUES (?kode,?nama,?lama)”)
IF E<0
MESSAGEBOX(“ERROR”)
ENDIF
thisform.grid1.Refresh

SQLEXEC(A,”SELECT * FROM Jabatan”,”X”)
SELECT * FROM X

command “click” pada edit

*STORE SQLSTRINGCONNECT (“DRIVER=SQL SERVER;DATABASE=simakda_kalbar;UID=SA;PWD=SA;SERVER=(LOCAL)”) TO A
Store Sqlstringconnect(“dsn=Test;uid=sa;pwd=”) To a

MESSAGEBOX(a)
kode=thisform.text1.Value
nama=thisform.text2.Value
lama=thisform.text3.Value
SQLEXEC(A,”SELECT * FROM Jabatan”,”X”)
SELECT * FROM X

command “click” pada delete

*STORE SQLSTRINGCONNECT (“DRIVER=SQL SERVER;DATABASE=simakda_kalbar;UID=SA;PWD=SA;SERVER=(LOCAL)”) TO A
Store Sqlstringconnect(“dsn=Test;uid=sa;pwd=”) To a

MESSAGEBOX(a)
kode=thisform.text1.Value
nama=thisform.text2.Value
lama=thisform.text3.Value

DELETE
thisform.text1.Value=””
thisform.text2.Value=””
thisform.text3.Value=””
thisform.text1.SetFocus
thisform.grid1.Refresh
SQLEXEC(A,”SELECT * FROM Jabatan”,”X”)
SELECT * FROM X

command “click” pada reset

thisform.text1.Value=”
thisform.text2.Value=”
thisform.text3.Value=”

 form1, “activate” 

*STORE SQLSTRINGCONNECT (“DRIVER=SQL SERVER;DATABASE=simakda_kalbar;UID=SA;PWD=SA;SERVER=(LOCAL)”) TO

SET DELETED on

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s