تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشكلة في كود اضافة الى sql 2012
#1
السلام عليكم
ممكن حل مشكلة الخطا دائما يظهر لي خطا لم يتم حفظ البيانات


        Dim con As New SqlConnection("Server= \SQLEXPRESS; Database = mail; Integrated Security = true")

        Dim da As New SqlDataAdapter
        Dim dt As New DataTable
        Dim cmd As New SqlCommand
        Dim cmdb As SqlCommandBuilder

        Try

            Dim r As DataRow = dt.NewRow
            r(1) = TextBox1.Text
            r(2) = TextBox2.Text
            r(3) = TextBox3.Text
            r(4) = TextBox4.Text
            r(5) = TextBox5.Text
            r(6) = TextBox6.Text
            r(7) = TextBox7.Text


            dt.Rows.Add®
            cmdb = New SqlCommandBuilder(da)
            da.Update( dt )

            MsgBox(" تم الادخال بنجاح", MsgBoxStyle.Information)

        Catch ex As Exception


            MsgBox(" لم يتم الادخال بنجاح", MsgBoxStyle.Information)


        End Try
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مشكلة في كود اضافة الى sql 2012 - بواسطة moh developer - 22-09-20, 07:08 PM


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


يقوم بقرائة الموضوع: