Click here to Skip to main content
15,913,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What is Pin
VenkatFor.NET20-Jul-04 11:40
VenkatFor.NET20-Jul-04 11:40 
QuestionWhat is the.... Pin
KORCARI20-Jul-04 9:06
KORCARI20-Jul-04 9:06 
AnswerRe: What is the.... Pin
rida_younis21-Jul-04 4:24
rida_younis21-Jul-04 4:24 
GeneralUsing PropertyDescriptor from the Compact Framework Pin
knmcbrid20-Jul-04 8:35
knmcbrid20-Jul-04 8:35 
GeneralRe: Using PropertyDescriptor from the Compact Framework Pin
Dave Kreskowiak21-Jul-04 7:40
mveDave Kreskowiak21-Jul-04 7:40 
Generalif then else or Select case Pin
fo0lish20-Jul-04 8:26
fo0lish20-Jul-04 8:26 
GeneralRe: if then else or Select case Pin
Jon G20-Jul-04 8:51
Jon G20-Jul-04 8:51 
GeneralBulk Insert Help Pin
superwinsock20-Jul-04 1:52
superwinsock20-Jul-04 1:52 
Hey Guys

I am trying to Bulk Insert a Text file into an SQL DB through VB6. I have never used this Object Model before so any help would be appreciated.

I have this code from MSDN but cant seem to implement it??

-----------------------------
'initialize Payroll table in DTS_UE db with bulk data
Dim objPackage As DTS.Package2
Dim objConnect As DTS.Connection2
Dim objStep As DTS.Step
Dim objTask As DTS.Task
Dim objBulkCopy As DTS.BulkInsertTask

On Error GoTo Handler

Set objPackage = New DTS.Package

'create database connection
Set objConnect = objPackage.Connections.New("SQLOLEDB.1")

With objConnect
.ID = 1
.DataSource = "(Local)"
.UseTrustedConnection = True
End With

objPackage.Connections.Add objConnect
'create step and task, specify data file and format
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSBulkInsertTask")
Set objBulkCopy = objTask.CustomTask

With objBulkCopy
.Name = "BulkInsTask"
.DataFile = "C:\Development\Bulk Insert\TEST.txt"
.ConnectionID = 1
.DestinationTableName = "BULK_INSERT_TEST..BI_Test"
.FieldTerminator = "-t"
.RowTerminator = "\n"
End With

'link step to task to package, run package
objStep.TaskName = objBulkCopy.Name
objStep.Name = "BulkInsStep"
With objPackage
.Steps.Add objStep
.Tasks.Add objTask
.FailOnError = True

.Execute
End With
Generalvb.net Pin
ahmad_yossef20-Jul-04 0:06
ahmad_yossef20-Jul-04 0:06 
GeneralRe: vb.net Pin
gthompson200520-Jul-04 7:02
gthompson200520-Jul-04 7:02 
GeneralRe: vb.net Pin
rida_younis21-Jul-04 3:56
rida_younis21-Jul-04 3:56 
GeneralDynamically generating One Activex control from Other ActiveX control on users form Pin
Member 119551220-Jul-04 0:01
Member 119551220-Jul-04 0:01 
GeneralList the content of the registry Pin
Roath Kanel19-Jul-04 17:57
sussRoath Kanel19-Jul-04 17:57 
GeneralRe: List the content of the registry Pin
Dave Kreskowiak21-Jul-04 7:33
mveDave Kreskowiak21-Jul-04 7:33 
GeneralRe: List the content of the registry Pin
Mekong River21-Jul-04 12:01
Mekong River21-Jul-04 12:01 
GeneralRe: List the content of the registry Pin
Dave Kreskowiak21-Jul-04 15:00
mveDave Kreskowiak21-Jul-04 15:00 
Generalsystem.net.socket Pin
shingo9919-Jul-04 17:27
shingo9919-Jul-04 17:27 
GeneralDatagrid Pin
beowulfagate19-Jul-04 17:27
beowulfagate19-Jul-04 17:27 
GeneralUsing API in .Net, finding windows classname Pin
cheezdog19-Jul-04 13:11
cheezdog19-Jul-04 13:11 
Generaladding to system registry Pin
dotnetfriend19-Jul-04 11:05
dotnetfriend19-Jul-04 11:05 
GeneralRe: adding to system registry Pin
mythinky19-Jul-04 16:26
mythinky19-Jul-04 16:26 
GeneralRe: adding to system registry Pin
VenkatFor.NET20-Jul-04 11:43
VenkatFor.NET20-Jul-04 11:43 
QuestionHow to Get Position of users form & position of Activex Control within the users form Pin
Member 119551219-Jul-04 8:05
Member 119551219-Jul-04 8:05 
Generalconnecting computers Pin
GaryKoh19-Jul-04 5:42
GaryKoh19-Jul-04 5:42 
GeneralAuto Redirect .asp to .aspx Pin
Member 124540819-Jul-04 4:09
Member 124540819-Jul-04 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.