Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> EXPORT A GREAT AMOUNT OF DATA FROM A TEXT FILE TO AN ORACLE TABLE

EXPORT A GREAT AMOUNT OF DATA FROM A TEXT FILE TO AN ORACLE TABLE

From: Javi <eusjavi_at_ole.com>
Date: 14 Nov 2001 03:37:07 -0800
Message-ID: <7cfbd9e8.0111140337.5f1d73d2@posting.google.com>


Hi, i have to export (monthly) a 300 Mb text file to an oracle table, and the only method that i know to do it is the one below. This is a bullsheet i need a very higher speed. Does anybody know how to do it much faster in other way?

Private Sub Command2_Click()
'Dim nADO As Adodc

  Dim dbTxt As Database
  Dim rds As Recordset      

  Set dbTxt = OpenDatabase("C:\", False, False, "TEXT;")   Set rds = dbTxt.OpenRecordset("Co1107~1.txt")   

Screen.MousePointer = vbHourglass
 nADO.CommandType = adCmdTable

nADO.ConnectionString = "Provider=MSDAORA.1;Password=********;User ID=***;Data Source=****;Persist Security Info=True"

nADO.RecordSource = "tarifica.llamadas1" nADO.Refresh

rds.MoveFirst
MsgBox (Time())

ProgressBar1.Min = 0
ProgressBar1.Max = rds.RecordCount + 2
ProgressBar1.Value = 0

While Not rds.EOF
  nADO.Recordset.AddNew
  nADO.Recordset("col0") = rds(0) 
  nADO.Recordset.Update

  rds.MoveNext
  ProgressBar1.Value = ProgressBar1.Value + 1 Wend
rds.Close
nADO.Recordset.Close
Dim a As Integer
a = 1

MsgBox (Time())

Screen.MousePointer = vbNormal
End Sub Received on Wed Nov 14 2001 - 05:37:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US