تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشكلة الفراغ الفاضي في قاعدة SQL Server
#13
@@أبورائد@@ كتب :السلام عليكم ورحمة الله وبركاته



جرب ترتيبي! وأخبرني

PHP كود :
Private Sub Button3_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button3.Click
        
' Add New Record
        Try
            Dim sql As String = " INSERT INTO  Table1   " & _
                                " (  UserName           " & _
                                "  , MobileNumber       " & _
                                "  , Date               " & _
                                "  , Price              " & _
                                "  , Rest               " & _
                                "  , Recipient          " & _
                                "  , NameShop           " & _
                                "  , PlaceShop          " & _
                                "  , UserShop           " & _
                                "  , Email              " & _
                                "  , NumberDresses      " & _
                                "  , ColorDress1        " & _
                                "  , TypeCloth1         " & _
                                "  , TypeDesign1        " & _
                                "  , TypePocket1        " & _
                                "  , IDCloth1           " & _
                                "  , LengthM1           " & _
                                "  , LengthY1           " & _
                                "  , ColorDress2        " & _
                                "  , TypeCloth2         " & _
                                "  , TypeDesign2        " & _
                                "  , TypePocket2        " & _
                                "  , IDCloth2           " & _
                                "  , LengthM2           " & _
                                "  , LengthY2           " & _
                                "  , ColorDress3        " & _
                                "  , TypeCloth3         " & _
                                "  , TypeDesign3        " & _
                                "  , TypePocket3        " & _
                                "  , IDCloth3           " & _
                                "  , LengthM3           " & _
                                "  , LengthY3           " & _
                                "  , LengthDress        " & _
                                "  , DisplayKtf         " & _
                                "  , DisplayDress       " & _
                                "  , LengthKmSadh       " & _
                                "  , LengthKmKbk        " & _
                                "  , DisplayKmSadh1     " & _
                                "  , DisplayKmSadh2     " & _
                                "  , DisplayKmSadh3     " & _
                                "  , DisplayKmKbk1      " & _
                                "  , DisplayKmKbk2      " & _
                                "  , DisplayKmKbk3      " & _
                                "  , RakbhKllab1        " & _
                                "  , RakbhKllab2        " & _
                                "  , RakbhSadh1         " & _
                                "  , RakbhSadh2         " & _
                                "  , DownDress1         " & _
                                "  , DownDress2         " & _
                                "  , LengthKbzor        " & _
                                "  , Other          )   " & _
                                " VALUES                " & _
                                " (  @UserName          " & _
                                "  , @MobileNumber      " & _
                                "  , @Date              " & _
                                "  , @Price             " & _
                                "  , @Rest              " & _
                                "  , @Recipient         " & _
                                "  , @NameShop          " & _
                                "  , @PlaceShop         " & _
                                "  , @UserShop          " & _
                                "  , @Email             " & _
                                "  , @NumberDresses     " & _
                                "  , @ColorDress1       " & _
                                "  , @TypeCloth1        " & _
                                "  , @TypeDesign1       " & _
                                "  , @TypePocket1       " & _
                                "  , @IDCloth1          " & _
                                "  , @LengthM1          " & _
                                "  , @LengthY1          " & _
                                "  , @ColorDress2       " & _
                                "  , @TypeCloth2        " & _
                                "  , @TypeDesign2       " & _
                                "  , @TypePocket2       " & _
                                "  , @IDCloth2          " & _
                                "  , @LengthM2          " & _
                                "  , @LengthY2          " & _
                                "  , @ColorDress3       " & _
                                "  , @TypeCloth3        " & _
                                "  , @TypeDesign3       " & _
                                "  , @TypePocket3       " & _
                                "  , @IDCloth3          " & _
                                "  , @LengthM3          " & _
                                "  , @LengthY3          " & _
                                "  , @LengthDress       " & _
                                "  , @DisplayKtf        " & _
                                "  , @DisplayDress      " & _
                                "  , @LengthKmSadh      " & _
                                "  , @LengthKmKbk       " & _
                                "  , @DisplayKmSadh1    " & _
                                "  , @DisplayKmSadh2    " & _
                                "  , @DisplayKmSadh3    " & _
                                "  , @DisplayKmKbk1     " & _
                                "  , @DisplayKmKbk2     " & _
                                "  , @DisplayKmKbk3     " & _
                                "  , @RakbhKllab1       " & _
                                "  , @RakbhKllab2       " & _
                                "  , @RakbhSadh1        " & _
                                "  , @RakbhSadh2        " & _
                                "  , @DownDress1        " & _
                                "  , @DownDress2        " & _
                                "  , @LengthKbzor       " & _
                                "  , @Other           ) "

            Dim Cmd As New SqlCommand(sql, Conn)

            Cmd.Parameters.AddWithValue("@UserName      ", txtUserName.Text)
            Cmd.Parameters.AddWithValue("@MobileNumber  ", txtMobileNumber.Text)
            Cmd.Parameters.AddWithValue("@Date          ", txtDate.Text)
            Cmd.Parameters.AddWithValue("@Price         ", txtPrice.Text)
            Cmd.Parameters.AddWithValue("@Rest          ", txtRest.Text)
            Cmd.Parameters.AddWithValue("@Recipient     ", txtRecipient.Text)
            Cmd.Parameters.AddWithValue("@NameShop      ", txtNameShop.Text)
            Cmd.Parameters.AddWithValue("@PlaceShop     ", txtPlaceShop.Text)
            Cmd.Parameters.AddWithValue("@UserShop      ", txtUserShop.Text)
            Cmd.Parameters.AddWithValue("@Email         ", txtEmail.Text)
            Cmd.Parameters.AddWithValue("@NumberDresses ", txtNumberDresses.Text)
            Cmd.Parameters.AddWithValue("@ColorDress1   ", txtColorDress1.Text)
            Cmd.Parameters.AddWithValue("@TypeCloth1    ", txtTypeCloth1.Text)
            Cmd.Parameters.AddWithValue("@TypeDesign1   ", txtTypeDesign1.Text)
            Cmd.Parameters.AddWithValue("@TypePocket1   ", txtTypePocket1.Text)
            Cmd.Parameters.AddWithValue("@IDCloth1      ", txtIDCloth1.Text)
            Cmd.Parameters.AddWithValue("@LengthM1      ", txtLengthM1.Text)
            Cmd.Parameters.AddWithValue("@LengthY1      ", txtLengthY1.Text)
            Cmd.Parameters.AddWithValue("@ColorDress2   ", txtColorDress2.Text)
            Cmd.Parameters.AddWithValue("@TypeCloth2    ", txtTypeCloth2.Text)
            Cmd.Parameters.AddWithValue("@TypeDesign2   ", txtTypeDesign2.Text)
            Cmd.Parameters.AddWithValue("@TypePocket2   ", txtTypePocket2.Text)
            Cmd.Parameters.AddWithValue("@IDCloth2      ", txtIDCloth2.Text)
            Cmd.Parameters.AddWithValue("@LengthM2      ", txtLengthM2.Text)
            Cmd.Parameters.AddWithValue("@LengthY2      ", txtLengthY2.Text)
            Cmd.Parameters.AddWithValue("@ColorDress3   ", txtColorDress3.Text)
            Cmd.Parameters.AddWithValue("@TypeCloth3    ", txtTypeCloth3.Text)
            Cmd.Parameters.AddWithValue("@TypeDesign3   ", txtTypeDesign3.Text)
            Cmd.Parameters.AddWithValue("@TypePocket3   ", txtTypePocket3.Text)
            Cmd.Parameters.AddWithValue("@IDCloth3      ", txtIDCloth3.Text)
            Cmd.Parameters.AddWithValue("@LengthM3      ", txtLengthM3.Text)
            Cmd.Parameters.AddWithValue("@LengthY3      ", txtLengthY3.Text)
            Cmd.Parameters.AddWithValue("@LengthDress   ", txtLengthDress.Text)
            Cmd.Parameters.AddWithValue("@DisplayKtf    ", txtDisplayKtf.Text)
            Cmd.Parameters.AddWithValue("@DisplayDress  ", txtDisplayDress.Text)
            Cmd.Parameters.AddWithValue("@LengthKmSadh  ", txtLengthKmSadh.Text)
            Cmd.Parameters.AddWithValue("@LengthKmKbk   ", txtLengthKmKbk.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmSadh1", txtDisplayKmSadh1.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmSadh2", txtDisplayKmSadh2.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmSadh3", txtDisplayKmSadh3.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmKbk1 ", txtDisplayKmKbk1.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmKbk2 ", txtDisplayKmKbk2.Text)
            Cmd.Parameters.AddWithValue("@DisplayKmKbk3 ", txtDisplayKmKbk3.Text)
            Cmd.Parameters.AddWithValue("@RakbhKllab1   ", txtRakbhKllab1.Text)
            Cmd.Parameters.AddWithValue("@RakbhKllab2   ", txtRakbhKllab2.Text)
            Cmd.Parameters.AddWithValue("@RakbhSadh1    ", txtRakbhSadh1.Text)
            Cmd.Parameters.AddWithValue("@RakbhSadh2    ", txtRakbhSadh2.Text)
            Cmd.Parameters.AddWithValue("@DownDress1    ", txtDownDress1.Text)
            Cmd.Parameters.AddWithValue("@DownDress2    ", txtDownDress2.Text)
            Cmd.Parameters.AddWithValue("@LengthKbzor   ", txtLengthKbzor.Text)
            Cmd.Parameters.AddWithValue("@Other", txtOther.Text)

            Conn.Open()
            Cmd.ExecuteNonQuery()
            Conn.Close()

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

        RefreshListView()

    End Sub 




السلام عليكم ورحمة الله وبركاته



الله يعطيك العافية على تعاونك ،، جااري التجربة
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مشكلة الفراغ الفاضي في قاعدة SQL Server - بواسطة shado1796_mybb_import4840 - 07-03-13, 03:36 AM


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


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