Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Importing text file to a table into using DTS


Message #1 by "Scott Wagler" <stonecold99@h...> on Wed, 28 Aug 2002 13:50:13
You're trying to index the DTS.Properties interface 
but it does not have a default value.
So you must have use the dictionary logic like in a
hash dictionary..
you can adjust your code using the "item" based
dictionary, like :

instead of :
> oTransProps("Text") = "'*******************" &
> vbCrLf

use :
>oTransProps.Item("Text").Value = _
             "'*******************"  & vbCrLf


Berkay






--- Scott Wagler <stonecold99@h...> wrote:
> Hi there,
> 
> I am having trouble with the syntax for importing a
> text file in a table 
> using DTS.  What i've done is copy the VB code
> created by SQL Server 
> (using the DTS wizard) into VB.NET and am having
> trouble with it compiling.
> 
> My error is related to the oTransProps("Text")
> variable.....i suspect this 
> may have something to do with the conversion from
> VB6 to VB.NET but i am 
> not sure.  Any help would be greatly appreciated.
> 
> The code where it appears is as follows:
> .
> .
> Dim oTransformation As DTS.Transformation2
> Dim oTransProps As DTS.Properties
> 
> oTransProps 
> oTransformation.TransformServerProperties
> oTransProps("Text") = "'*******************" &
> vbCrLf
> .
> .
>   
> 
> 
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills 
> from Visual Basic 6 to C#, the language of choice 
> of the .NET Framework.
>
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

  Return to Index