Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ahmedcheema

    Checking size of flat file in SSDT package before loading

    Got it working, here is the VB script Public Sub Main() ' GET THE FILE "LOCATION\NAME.ext" & WRITE IT TO THE 'FilePath' VARIABLE. Dim File_Location As String = CType(Dts.Variables("User::FilePath").Value, String) ' DEFINE A DATESTAMP FOR FILE UPDATE DATE &...
  2. ahmedcheema

    Checking size of flat file in SSDT package before loading

    The .Length property returns the correct size when the Dim object is declared as Byte only. Dim File_Size As Byte() File_Size = My.Computer.FileSystem.ReadAllBytes(File_Location) MsgBox("File Size: " & File_Size.Length) The File_Size.Length needs to be passed into a variable where I can...
  3. ahmedcheema

    Checking size of flat file in SSDT package before loading

    I forgot to add the FileSize variable in the ReadWriteVariables in Script Task Editor. Now I'm working on getting the expression built. But it looks like the .Length property doesn't give me the actual size on disk. Public Sub Main() ' GET THE FILE "LOCATION\NAME.ext" & WRITE IT TO...
  4. ahmedcheema

    Checking size of flat file in SSDT package before loading

    I've created a script task that checks whether a flat file exists before the data flow task is executed and that the file was last updated today, but I'm having some trouble with checking for the file size. After making sure that the file exists I would like to make sure that the file is larger...

Part and Inventory Search

Back
Top