Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1

    Exclamation No Error!! But cant Update in VB6 Help pls..


    Hi, guys any good heart there? heheh,

    anybody help me. what is the main problem? with my code: see below:
    assuming that i have the connection.. called CN..

    Dim sSQL As String

    If cmdUpdate.Caption = "UPDATE" Then
    Set CMD = New ADODB.Command
    sSQL = "Update header Set line='" & cboLine & "'"
    sSQL = sSQL & ",grpHead='" & txtGrphead.Text & "',shift='" & txtShift.Text & "'"
    sSQL = sSQL & ",supervisor='" & txtSupervisor.Text & "',jn='" & txtJn.Text & "'"
    sSQL=sSQL & ",shfSched='" & txtSched.Text & "',dte='" & txtDate.Text & "'"
    sSQL = sSQL & " Where id_edit=" & Val(lngid)
    With CMD
    .ActiveConnection = CN
    .CommandType = adCmdText
    .CommandText = sSQL
    .Execute

    End With

    End If
    MsgBox "DATA ADDED TO DATABASE ", vbInformation, "TO DATABASE"
    Set CMD = Nothing



    guys?... provider nako ge use kai provider=Microsoft.jet.OLEDB.4.0;Data Source = " & App.Path & "\Database\access.mdb"

    anyone pls... or u can email me in this email----> it2@firstflory-ph.com

  2. #2
    wlay error pero wlay ma update

    so more likely kay wlay record nga nakit.an sa condition nga imo gi set

  3. #3
    print sSQL in the debug pane (debug.print sSQL) and post here the result.

  4. #4
    moz_k2: what do u mean no record,,.. i inserted a record, 2nd is to search next is to update.. but no update done..

  5. #5

    Unhappy No Error!! But cant Update in VB6 Help pls..

    Hi, cold_fusion: below is the Debug print

    Update header Set line='6C',grpHead='EVAThisUpdate',shift='A',superv isor='EVA',jn='4988-A',shfSched='2PM-10PM',dte='17-OCT-2008' Where id_edit=0

    debug.print sSQL


    i wonder why the id_edit=0 ??

  6. #6
    Having the resulting SQL statement can help you debug your problem.
    The problem is that Val(lngid) will result to 0.
    Check "Ingid" field.
    Hint: debug.print Ingid, val(Ingid)

  7. #7
    You just answered your question.

    moz_k2: what do u mean no record,,.. i inserted a record, 2nd is to search next is to update.. but no update done..
    Hi, cold_fusion: below is the Debug print

    Update header Set line='6C',grpHead='EVAThisUpdate',shift='A',superv isor='EVA',jn='4988-A',shfSched='2PM-10PM',dte='17-OCT-2008' Where id_edit=0

    debug.print sSQL


    i wonder why the id_edit=0 ??
    No record where id_edit=0

    Check that lngid variable.

  8. #8
    sa WHERE dapit...

    wala siguroy record nga nakit-an para i-update


    yeah! bling bling men...abz'

  9. #9
    mokz :

    wala jud zero zero ang id_edit=0, id_edit kai autonumber cia sa database access 2000

    the question here is unsaon nia pag kita sa id_edit? pls.

  10. #10
    Hi all,
    tnx sa inyo help... i fix it nahh weeeeeeeeeeeeeeeeeeeeeeeeeee......

    ako ra gikuha ang ---> where id_edit=0 this line ako ge delete......
    like these..

    Update header Set line='6C',grpHead='EVAThisUpdate',shift='A',superv isor='EVA',jn='4988-A',shfSched='2PM-10PM',dte='17-OCT-2008'

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Replies: 2
    Last Post: 04-19-2013, 05:55 PM
  2. Replies: 8
    Last Post: 03-24-2013, 11:16 PM
  3. cant update windows . . need help mga boss!
    By charczstrife in forum Windows Software
    Replies: 14
    Last Post: 10-27-2012, 10:17 PM
  4. Ngita ug PSP store/shop in Cebu?help pls...
    By dalamhati in forum Gizmos & Gadgets (Old)
    Replies: 14
    Last Post: 01-05-2010, 12:56 AM
  5. Help Me I Cant Log In
    By mark eugene in forum Support Center
    Replies: 12
    Last Post: 06-06-2005, 02:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top