vb script using variables

how do i change this code so i am reading the date from my select statement

            Dim ht As New Collections.Hashtable(20)
            Dim c As New OleDbConnection( _
                      Dts.Connections.Item("Data Warehouse").ConnectionString)
            Dim sqlCommand As New OleDbCommand( _
                      "SELECT Extraction_Date FROM ELTO_Extraction_Date", c)

            Dim sqlResult As OleDbDataReader
            sqlResult = sqlCommand.ExecuteReader()
            While sqlResult.Read()
                If Dts.VariableDispenser.Contains( _
                                            "User::" + sqlResult.GetString(0)) Then
                    ht.Add(sqlResult.GetString(0), sqlResult.GetString(1))
                    Dts.VariableDispenser.LockForWrite("User::" + sqlResult.GetString(0))
                End If
            End While

            Dim vars As Variables

            Dim de As Collections.DictionaryEntry
            For Each de In ht
                vars(de.Key).Value = de.Value



            Dts.TaskResult = Dts.Results.Success

        Catch ex As Exception

        End Try
    End Sub

    Public Sub Process_Files()

        '---------------------------------- Sets the date and output path
        sDate = Right("00" & Day(Now()), 2) & Right("0" & Month(Now()), 2) & Right("00" & Year(Now()), 2)

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kiran SonawaneProject LeadCommented:
Try like this




Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aneilgAuthor Commented:
do you mean sdate = sqlResult.GetString("Extraction_Date")

aneilgAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.