this program read from text files an sql statment and auto insert into database just you need adodc
this program read from text files an sql statment and auto insert into database just you need adodc , richtext name as rtext1 and buttons
Rate this program read from text files an sql statment and auto insert into database just you need adodc
(1(1 Vote))
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Dim SQLstr As String
Set cmd = New ADODB.Command
rtext1.LoadFile "d:\rcompanies\1.txt"
X = rtext1.Text
With cmd
k = 0
Do While Len(X) > 10
pos = InStr(1, X, ";")
X = Right(X, Len(X) - pos)
k = k + 1
Loop
rtext1.LoadFile "d:\companies\1.txt"
X = rtext1.Text
bar1.Max = k + 1
bar1.Value = 1
Do While Len(X) > 10
pos = InStr(1, X, ";")
Data = Left(X, pos)
Data = Trim(Data)
X = Right(X, Len(X) - pos)
.ActiveConnection = Adodc1.ConnectionString
.CommandType = adCmdText
.CommandText = Data
.Execute
rtext1.Text = X
rtext1.SaveFile "d:\qatarcompanies\2.txt"
Adodc1.Refresh
DataGrid1.ReBind
Sleep 1000
bar1.Value = bar1.Value + 1
DoEvents
Loop
End With
End Sub
this program read from text files an sql statment and auto insert into database just you need adodc Comments
No comments yet — be the first to post one!
Post a Comment