16-02-20, 03:47 AM
(آخر تعديل لهذه المشاركة : 16-02-20, 03:53 AM {2} بواسطة asemshahen5.)
PHP كود :
Sub AlterTableX1(field_row As ListBox)
Dim intLoop As Integer
Dim strSQL As String
Dim strSQL1 As String
For intLoop = 0 To field_row.Items.Count - 1
strSQL = "ALTER TABLE Emp_Sal ADD " & _
field_row.Items(intLoop).ToString & " LONG INTEGER"
FillDataTable(strSQL)
strSQL1 = "ALTER TABLE tbl_General ADD " & _
field_row.Items(intLoop).ToString & " LONG INTEGER"
FillDataTable(strSQL1)
Next intLoop
MsgBox("تمت الإضافة بنجاح", MsgBoxStyle.Information, "البرنامج ")
End Sub
PHP كود :
Public Function FillDataTable(StrSQL As String) As DataTable
Dim cn As New SqlClient.SqlConnection("Server =(local);database=AlAsemMedicalClinicsDB;integrated security=true")
Dim da As New SqlClient.SqlDataAdapter(StrSQL, cn)
Dim dt As New DataTable
dt.Clear()
da.Fill(dt)
Return dt
End Function
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
