16-02-20, 10:34 PM
ComSys.rar (الحجم : 1.57 م ب / التحميلات : 8)
(16-02-20, 09:58 PM)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"
ExcuteNoneQury(strSQL)
strSQL1 = "ALTER TABLE tbl_General ADD " & _
field_row.Items(intLoop).ToString & " LONG INTEGER"
ExcuteNoneQury(strSQL1)
Next intLoop
MsgBox("تمت الإضافة بنجاح", MsgBoxStyle.Information, "البرنامج ")
End Sub
Sub ExcuteNoneQury(strSQL As String)
Dim cn As New OleDb.OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\TBLCO.accdb;Persist Security Info=True; Jet OLEDB:Database Password=Hagag2010")
Dim Cmd As New OleDb.OleDbCommand(strSQL, cn)
If cn.State = ConnectionState.Closed Then cn.Open()
Cmd.ExecuteReader()
If cn.State = ConnectionState.Open Then cn.Close()
End Sub
أسف على تأخرى فى الرد ولكن مازالت المشكلة قائمة ومرفق القاعدة وصورة من الخطأ
