11-05-21, 08:28 PM
(آخر تعديل لهذه المشاركة : 12-05-21, 05:24 PM {2} بواسطة aliabdullah.
تعديل السبب: شرح المشكلة
)
السلام عليكم هنالك مشكلة في هذين السطرين
Dim server As New Server(New ServerConnection(Con))
server.ConnectionContext.ExecuteNonQuery(st)
السطر الأول يعطي خطأ(()too many arguments to puplic sub new)
السطر الثاني يعطي خطأ (connection contex is not a member of E_PHARMA.server)
Dim server As New Server(New ServerConnection(Con))
server.ConnectionContext.ExecuteNonQuery(st)
السطر الأول يعطي خطأ(()too many arguments to puplic sub new)
السطر الثاني يعطي خطأ (connection contex is not a member of E_PHARMA.server)
كود :
Con = New SqlConnection("Data source=" & ComboBox1.Text & ";Initial Catalog=master;Integrated Security=True;MultipleActiveResultSets=True")
Con.Open()
Dim cb3 As String = "Create Database drug"
cmd = New SqlCommand(cb3)
cmd.Connection = Con
cmd.ExecuteNonQuery()
Con.Close()
Using sr As StreamReader = New StreamReader(Application.StartupPath & "\DATABASESCRIPT.sql")
st = sr.ReadToEnd()
Dim server As New Server(New ServerConnection(Con))
server.ConnectionContext.ExecuteNonQuery(st)
End Using