اذهب الي المحتوي
أوفيسنا

الاتصال بقاعدة البيانات من داخل صفحة ويب من نوع ASP.vb


د.كاف يار

الردود الموصى بها

الاتصال بقاعدة البيانات و جلب بيانات محددة

Using con As New SqlConnection("عنوان قاعدة البيانات")
            Using cmd As New SqlCommand("SELECT * FROM Employees WHERE  [Employee_ID]= '" & Employee_ID.Text & "';")
                Using sda As New SqlDataAdapter()
                    cmd.Connection = con
                    sda.SelectCommand = cmd
                    Using dt As New DataTable()
                        sda.Fill(dt)

                        TextBox1.Text = dt(0)("Employee_Name")
						TextBox2.Text =dt(0)("Employee_DOB")
                     
                    End Using
                End Using
            End Using
        End Using

 

  • Like 2
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information