Jumat, 12 Agustus 2011

Membuat Fungsi dalam VB 6.0

Berikut adalah contoh kode pembuatan fungsi pada VB 6.0
Public Function DeleteDataInDatabaseTables(Table As String, where As String) As Integer
On Error GoTo errDeleteDataInDatabaseTables
    sql = "delete from " & Table & " " & where
    cn.Execute (sql)
    DeleteDataInDatabaseTables = 1
Exit Function
errDeleteDataInDatabaseTables:
    DeleteDataInDatabaseTables = 0
End Function

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Justin Bieber, Gold Price in India