تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
تعديل الكود يا جماعه محدش بيرد عليا خالص insert
#1
PHP كود :
     For Each r As DataGridViewRow In dgvprodac.Rows
            Dim ad 
As Integer Val(r.Cells(0).Value)
            Dim txP As String Val(r.Cells(1).Value)
            Dim txt As Integer Val(r.Cells(2).Value)
            'Dim txC As Integer = Val(r.Cells(3).Value)
            Dim STTR As String

            cmd.CommandText = String.Format(" UPDATE [tab_pro] SET [qty] = qty +{0} , [price] = {2} WHERE [id] = {1} and  [price] = {2}   ", txt, ad, txP)
            If cmd.ExecuteNonQuery() Then


                Dim txC As Integer = ("select label from [tab_pro] WHERE [id] = {'" & ad & "'} ")
                STTR = ("insert into tab_pro (label,qty,price,id) values ({0},{1},{2},{3'" & 1 & "'})", txP, txt, txC , ad )


                cmd.ExecuteNonQuery()
            End If
        Next 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
تعديل الكود يا جماعه محدش بيرد عليا خالص insert - بواسطة نبيل كونكت - 13-07-17, 12:03 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم