String manipulation

  • Thread starter Thread starter JenHu
  • Start date Start date
J

JenHu

Hi experts,

I am writing a function to retrive a file from a folder. The database
stores the file name with .IN extension, and the file in the folder is
with .RET extension.
How do I change the file name's extension from
8000000136947_0000001_20041208_180636_BulkAcct.in to
8000000136947_0000001_20041208_180636_BulkAcct.RET

by programmatically?

say, the file name is stored in batch_table and column name is
File_Name, what should I do for strBatchFileName?

Thanks.
-----------------------------------------------------------------------
Public Function ProcessRET()
Dim EpayConnection As New SqlConnection
Dim cmdBatcheName As New SqlCommand
Dim dtrBatcheName As SqlDataReader
EpayConnection.ConnectionString = strEpayDBConn
With cmdBatcheName
.Connection = EpayConnection
.CommandText = "SELECT File_Name FROM Batch_Table Where
File_Status=2"
End With
Dim flRetBatch As File
Dim stRetBatch As FileStream
Dim smRetBatch As StreamReader
EpayConnection.Open()
dtrBatcheName = cmdBatcheName.ExecuteReader()
dtrBatcheName.Read()
Dim strFileName, strBatchFileName As String
strFileName = dtrBatcheName("File_Name")
strBatchFileName = ?
End Function

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
Back
Top