07-03-13, 03:05 AM
shado1796 كتب :
يعطيك العافية ،، لكن اين اضعه ؟ ..
في كود استقبال البيانات (عرض البيانات)
اكتب سطر او سطرين من كود عرض البيانات لاعدله.
shado1796 كتب :
يعطيك العافية ،، لكن اين اضعه ؟ ..
سعود كتب :في كود استقبال البيانات (عرض البيانات)
اكتب سطر او سطرين من كود عرض البيانات لاعدله.
@@أبورائد@@ كتب :السلام عليكم ورحمة الله وبركاته
جرب ترتيبي! وأخبرني
PHP كود :
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 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
السلام عليكم ورحمة الله وبركاته
@@أبورائد@@ كتب :السلام عليكم ورحمة الله وبركاته
ما هو إنت لازم تجرب في قاعدة بيانات جديدة ما يكون فيها بيانات من قبل
وبعدين الحقول الرقمية تكتبها داخل val مثل (val(txtID.Text
والتاريخ تكتبها داخل CDate مثل (CDate(txtDate.Text
السلام عليكم ورحمة الله وبركاته
'" & CDate(TextBox7.Text) & "'" & CDate(TextBox7.Text) & "shado1796 كتب :تم حل المشكلة :d ،، والحمد لله لم تظهر الرسالة ،،، لكن ظهرت مشكلة وهي اني اذا لم اريد وضع التاريخ ،، واقوم بالحفظ يقوم باعطائي خطأ اني يجب علي كتابة التاريخ
'" & CDate(TextBox7.Text) & "'Easy 4ever كتب :تأكد من الحقل في قاعدة البيانات هل خاصية Allow Nulls هل هو مفعل أم لا إذا كان لا يجب عليك تفعيله
ومن ناحية كتابة الكود أكتب هذا
كود :
'" & CDate(TextBox7.Text) & "'