Need suggestion

  • I need a small suggestions in creating the packages.

    I am having a table TableA in sql server 2005, Its having columns, filename and filesize.

    Column Filename - Filename and its location

    Column Filesize - Filesize of the file.

    Am having the filename in the column Filename.. Now, i need to find the size of the filename and populate the same in the filesize.. How can i do this?

    Whether i have to write a script task to find the filesize and populate in this column? If Yes, please provide me some code snippet.

    Else, after the package execution(after populating the filename in the table TableA).

    shall i create a dotnet application to populate this column Filesize.

    Which one is the best one and please provide me some code snippet to achieve the same.

    Thanks and Regards,
    Venkatesan Prabu, 😛
    My Blog:

    http://venkattechnicalblog.blogspot.com/

  • Yeah, I would do it in a script task.

    I have a snippet here for accessing file properties so you should be able to make it to what you want.

    Dim f As New IO.FileInfo("C:\Deploy\MyFile.txt")

    If f.Exists Then

    'f.Delete()

    f.CreationTime = Date.Now

    Else

    f.Create()

    'f.CreationTime = Date.Now

    End If

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply