J
JenHu
I don't know how to put the datarow value into a string value, can you
please help?
For example: cmdBatchName SQL command will return 3 file_name
121104_14
121204_16
121204_17
I want to get these 3 values in my For loop.
THanks.
--------------------------------------------------------------------------
Dim EpayConnection As New SqlConnection
Dim cmdBatchName As New SqlCommand
Dim dtrBatchName As SqlDataReader
Dim strRetFileName As String
Dim dataAdapter As New SqlDataAdapter
Dim dataSet As New DataSet
Dim r As DataRow
EpayConnection.ConnectionString = strEpayDBConn
cmdBatchName.Connection = EpayConnection
cmdBatchName.CommandText = "SELECT File_Name FROM
EPay_Batch_Table Where File_Status=2"
cmdBatchName.CommandType = CommandType.Text
dataAdapter.SelectCommand = cmdBatchName
dataAdapter.Fill(dataSet, "dtEPayFiles")
Dim dt As New DataTable
EpayConnection.Open()
For Each r In dataSet.Tables("dtEpayFiles").Rows
strRetFileName = ????
Next
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
please help?
For example: cmdBatchName SQL command will return 3 file_name
121104_14
121204_16
121204_17
I want to get these 3 values in my For loop.
THanks.
--------------------------------------------------------------------------
Dim EpayConnection As New SqlConnection
Dim cmdBatchName As New SqlCommand
Dim dtrBatchName As SqlDataReader
Dim strRetFileName As String
Dim dataAdapter As New SqlDataAdapter
Dim dataSet As New DataSet
Dim r As DataRow
EpayConnection.ConnectionString = strEpayDBConn
cmdBatchName.Connection = EpayConnection
cmdBatchName.CommandText = "SELECT File_Name FROM
EPay_Batch_Table Where File_Status=2"
cmdBatchName.CommandType = CommandType.Text
dataAdapter.SelectCommand = cmdBatchName
dataAdapter.Fill(dataSet, "dtEPayFiles")
Dim dt As New DataTable
EpayConnection.Open()
For Each r In dataSet.Tables("dtEpayFiles").Rows
strRetFileName = ????
Next
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*