dbTalk Databases Forums  

how to read the columns from flat file connection Manager programmatically

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss how to read the columns from flat file connection Manager programmatically in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sivdeep
 
Posts: n/a

Default how to read the columns from flat file connection Manager programmatically - 06-16-2006 , 08:10 AM






Hi Everybody,

My Goal is Moving Data from Flat file to OLEDB Destination
programmatically using integration services.


I have created a flat file Connection Manager programmatically.
I have set the properities for accesssing the text file.
But, I don't know, how to set the column delimiter property.

here are the following.

Dim cmflatFile As ConnectionManager =
package.Connections.Add("FLATFILE")
'cmflatFile = package.Connections.Add("FLATFILE")
cmflatFile.Name = "FlatFileConnection"
cmflatFile.Description = "FlatFile Connection Manager"
cmflatFile.ConnectionString = sSourceDirectory & DATAFILENAME
cmflatFile.Properties("DataRowsToSkip").SetValue(c mflatFile,
0)

cmflatFile.Properties("ColumnNamesInFirstDataRow") .SetValue(cmflatFile,
False)
cmflatFile.Properties("Unicode").SetValue(cmflatFi le, False)
cmflatFile.Properties("Format").SetValue(cmflatFil e,
"Delimited")
cmflatFile.Properties("RowDelimiter").SetValue(cmf latFile,
vbCrLf)
cmflatFile.Properties("TextQualifier").SetValue(cm flatFile,
"<none>")
cmflatFile.Properties("HeaderRowsToSkip").SetValue (cmflatFile,
0)

cmflatFile.Properties("HeaderRowDelimiter").SetVal ue(cmflatFile,
vbCrLf)
cmflatFile.Properties("CodePage").SetValue(cmflatF ile, 1252)


I have created the flat file source using flat file connection manager.

But, still, i can't read the columns from flat file. Becuase, I am
missing to set the column delimiter property.

Please let me know, how to set the column delimiter property and how to
retrieve the columns from flat file.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.