|
-
September 23rd, 1999, 11:52 AM
#1
SqlDmo
does anybody have a code used to make a bcp with SqlDmo, because when i doit i get an error message with no description and a error number -2147003586 (8007533e)
this is my code:
Dim i as Integer
Dim lngBulk as Long
Dim tabla as SQLDMO.Table
Dim db as SQLDMO.Database
Dim db2 as SQLDMO.Database
Dim Base as SQLDMO.SQLServer
public withevents bcp1 as SQLDMO.BulkCopy
private Sub Command1_Click()
for Each tabla In db.Tables
If tabla.TypeOf <> SQLDMOObj_SystemTable then
If LCase(tabla.Name) = "tblconfig" then
Label1.Caption = tabla.Name
lngBulk = tabla.ExportData(bcp1)
End If
End If
next
Base.DisConnect
Base.Close
End Sub
private Sub Form_Load()
i = 0
set tabla = new SQLDMO.Table
set db = new SQLDMO.Database
set bcp1 = new SQLDMO.BulkCopy
set Base = new SQLDMO.SQLServer
Base.EnableBcp = true
Base.Connect "nt_udes"
set db = Base.Databases("oconsib")
With bcp1
.UseExistingConnection = true
.UseBulkCopyOption = true
.DataFileType = SQLDMODataFile_Default
.ServerBCPDataFileType = SQLDMOBCPDataFile_Default
.ServerBCPKeepIdentity = true
.ServerBCPKeepNulls = true
.SuspendIndexing = true
.UseServerSideBCP = false
.UseBulkCopyOption = true
.DataFilePath = "c:\temp\texto.txt"
.FormatFilePath = "c:\temp\formato.fmt"
.ErrorFilePath = "c:\temp\error.err"
.LogFilePath = "c:\temp\log.log"
.ImportRowsPerBatch = 999
End With
End Sub
thanks
-
August 24th, 2001, 06:44 PM
#2
Re: SqlDmo
did u find something about bcp with sqldmo ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|