bila di compile pake Mata dan oleh system pun bila di
jalankan juga tidak error, karena error traping
diambil aleh oleh On Error Resume next, Coba anda
remark statement tersebut kemudian jalankan kembali,
error nya muncul apa ?

Saran : 
1. sebaiknya instruksi "jangan di gunakan"
2. .ConnectionString = "provider=sqloledb;user
   id=EMC;password=rers123;persist security info=true;

Connection string di atas sebaiknya jangan full-gar
seperti ini, untu mengurangi hal2 "jahil". karena ada
informasi Data Source, initial catalog, uid, dan pwd.

sebaiknya anda edit menjadi
.ConnectionString = "provider=sqloledb;user
   id=myID;password=mypassword;persist security
info=true;


TK
--- rima <[EMAIL PROTECTED]> wrote:

> ini contoh programnya:
> 
> 
> Dim ECON As ADODB.Connection
> Dim RS1 As ADODB.Recordset
> ============================================
> 'ini maslahnya
> 'pas aku add data pertama masuk tapi pas aku add
> lagi gak masuk datanya
> Private Sub Command1_Click() 'ini tombol add
> If Len(Trim(Text1.Text)) < 5 Or
> Len(Trim(Text1.Text)) > 5 Then
> MsgBox ("ID tidak boleh <5 ATAU >5")
> Text1.SetFocus
> Text1.Text = " "
> Exit Sub
> End If
> 
> 
> If Text2.Text = " " Then
> MsgBox ("diisi...")
> Text2.SetFocus
> Exit Sub
> End If
> 
> 
>  If Len(Trim(Text1.Text)) = 5 And Text2.Text <> " "
> Then
>      ok
>     
>            
>         If RS1.RecordCount > 0 Then
>            MsgBox ("Data Sudah Ada")
>            Text1.SetFocus
>            Exit Sub
>            End If
>            On Error Resume Next
>            RS1.AddNew
>            RS1.Fields("CD_BRG") = Text1.Text
>            RS1.Fields("NM_BRG") = Text2.Text
>            RS1.Update
>            End If
>            
>                      
>           BLANK 'ini fungsi kosongkan
>                       
>            
>                     
>                     
>            
>  
> End Sub
> 
> =============================================
> 'ini fungsinya
> 
> Private Sub BLANK()
> Text1.Text = " "
> Text2.Text = " "
> Text1.SetFocus
> 
> End Sub
> ===================================================
> Private Sub Form_Load()
> 
> Set ECON = New ADODB.Connection
> With ECON
> .ConnectionString = "provider=sqloledb;user
> id=EMC;password=rers123;persist security info=true;
> initial catalog=tester;data source=rio-csumum"
> .Open
> If Not .State = adStateOpen Then
>           MsgBox "Tidak dapat membuat hubungan ke
> database"
>       End If
> End With
> 
> End Sub
> =============================================
> 'ini fungsi buka recordsetnya
> Private Sub ok()
> Dim sql As String
> Set RS1 = New ADODB.Recordset
> 
> 
> sql = "select * from jns_brg where cd_brg='" &
> Trim(Text1.Text) & "'"
>        With RS1
>          .ActiveConnection = ECON
>          .CursorLocation = adUseClient
>          .CursorType = adOpenDynamic
>          .LockType = adLockOptimistic
>          .Source = sql
>          .Open
>          End With
>          
>          
> End Sub
>   ----- Original Message ----- 
>   From: Tatu Inderawan 
>   To: [email protected] 
>   Sent: Wednesday, August 10, 2005 12:12 PM
>   Subject: RE: [Programmer-VB] TANYA UPDATE RECORD
> 
> 
>   sory neh, aku kurang nangkep maksudnya, kirim aja
> codingnya sekalian error msg-nya ya?
>   takutnya codenya sudah benar tp logikanya yg
> salah... OK...
> 
>   sekedar gambaran :
> 
>   Private Sub cmd_AddSave()
> 
>   fungsi_simpan
>   fungsi_kosongkan_teks
> 
>   End Sub
> 
>   dan pastikan koneksi database & record sudah di
> open sebelumnya...
> 
>     -----Original Message-----
>     From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of
> rima
>     Sent: 10 Agustus 2005 11:43
>     To: [email protected]
>     Subject: Re: [Programmer-VB] TANYA UPDATE RECORD
>     Importance: High
> 
> 
>     input pertama masuk tapi pas yang keduakalinya
> mo input datanya gak masuk...
> 
>     pas aku teliti ternyata soal peletakan fungsi
> untuk mengosongkan teks di interface...
> 
>     jadi gini ceritanya, aku mo buat tombol add itu
> sekalian simpan data dan mengosongkan teks di
> interfacenya...ternyata jadinya begitu...ada solusi
> gak ya Tu.....soalnya klo pas fungsi menghapus teks
> di interfacenya gak aku aktifin data yang aku input
> masuk semua gimana ya ngakalin fungsi itu supaya gak
> seperti itu....
>       ----- Original Message ----- 
>       From: Tatu Inderawan 
>       To: [email protected] 
>       Sent: Wednesday, August 10, 2005 8:13 AM
>       Subject: RE: [Programmer-VB] TANYA UPDATE
> RECORD
> 
> 
>       maksudnya input data yg pertama bisa atau
> nggak?
>         -----Original Message-----
>         From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of
> rima
>         Sent: 09 Agustus 2005 16:16
>         To: [email protected]
>         Subject: [Programmer-VB] TANYA UPDATE RECORD
> 
> 
>         Dear All,
> 
> 
>         aku ada trouble didatabase sql, yaitu pas
> input data pertama tapi data yang kedua tidak
> masuk...ada yang bisa kasih pencerahan gak
> ya????please...
> 
> 
>         thank's
> 
> 
>         rio
> 
> 
>     Untuk keluar dari millis ini, kirim email kosong
> ke:
>     [EMAIL PROTECTED]
> 
> 
> 
> 
> 
>     SPONSORED LINKS Programming languages 
> Programmer  C programming language  
>           Computer programming languages  Java
> programming language  C programming language  
> 
> 
>
----------------------------------------------------------------------------
>     YAHOO! GROUPS LINKS 
> 
>       a..  Visit your group "Programmer-VB" on the
> web.
>         
>       b..  To unsubscribe from this group, send an
> email to:
> 
=== message truncated ===



                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hmqps69/M=362131.6882499.7825260.1510227/D=groups/S=1705115364:TM/Y=YAHOO/EXP=1123662216/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke