vb script using variables

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

            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)

            c.Open()
            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
            sqlResult.Close()

            Dim vars As Variables
            Dts.VariableDispenser.GetVariables(vars)

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

            Next
            vars.Unlock()


            Process_Files()

            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

aneilgAsked:
Who is Participating?
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

sqlResult.GetString("Extraction_Date")

OR


sqlResult.Item("Extraction_Date")
0

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")

0
aneilgAuthor Commented:
partly
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.