Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11

    Quote Originally Posted by ventura View Post
    Hi all,
    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'
    This is wrong.
    I think this will have a catastrophic effect to your data.
    ALL the records will be replaced with this info.

    Or this is what you wanted to do...

  2. #12
    cold_fusion:

    youre right as i read your reply now,
    i have 2 records in a table i update the 1st data same data i got wen i search the second...

    DAMN!!! i cant update without the id_edit ( pls help..

  3. #13
    pwede nimo kuhaon ang pinakadako nga value sa id_edit
    before ka mo update nya mao na imo gamiton pra sa condition

    applicable lang kung wlay lain nag insert sa db

  4. #14
    Hi,

    moz_k2 : unsaon nako pagkuha sa pinakadako na value ?

    pls advise

  5. #15
    gamiton nimo ang max

    select max(column) from table

  6. #16

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

    Quote Originally Posted by moz_k2 View Post
    gamiton nimo ang max

    select max(column) from table

    how unsa nako? gae ko sa format sa ia code u have?

    tnx for help

  7. #17
    Quote Originally Posted by ventura View Post
    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
    watch out sa mga closing quotes bro usually if your trying to concatenate string, leave one space after the single quote each line if the string is not yet terminated. And also do not use on error resume next - so that you could return the correct error. And also use trim for string field values.

    you could also do like this:

    Dim sSQL1, sSQL2, sSQL3, sSQL4, sSQL5 As String

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

    End With

    and also where did you populate your data? datagrid, flexgrid or listview? or just on text boxes?
    Last edited by uzumaki; 11-04-2008 at 02:10 PM.

  8. #18
    Quote Originally Posted by ventura View Post
    how unsa nako? gae ko sa format sa ia code u have?

    tnx for help
    mao nman to ang format.
    kung nahan ka ug mas detailed nga info kay search lang sa net.
    so as for the examples you can search for it also.

  9.    Advertisement

Page 2 of 2 FirstFirst 12

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