تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] مطلوب مساعدة في برنامج يحدث اخطاء
#4
ادخل الى المديول "GlobalModule"و تأكد من معلومات نص الاتصال و ضع جملة :

كود :
Public Function opendb() As SqlConnection
    'conn.ConnectionString = "Data Source=(LocalDB)\v11.0;AttachDbFilename=" + Application.StartupPath + "\dental.mdf"
    Try
       Dim conn As New SqlConnection("Data Source=(Local);Initial Catalog=dental;Integrated Security=True")
       If conn.State = 1 Then conn.Close()
       conn.Open()
       cmd.Connection = conn
       cmd.CommandType = CommandType.Text
       Return conn
    Catch ex As Exception
       MsgBox(ex.Message)
       Return Nothing
    End Try
End Function
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: مطلوب مساعدة في برنامج يحدث اخطاء - بواسطة asemshahen5 - 10-10-18, 03:48 PM


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


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