G
Guest
I am using visual studio with .Net and I am trying to import a text file into
a table
I have a date in this file ie
01012002
it is imported
1012002, stripping off the leading zero
I can't change the import file, that is the way is comes to me, but I need
to import the leading zero as well
how do I force it to give me exactly what is in the file, instead of making
the decision that it is a number and stripping the 0?
below is the code I am using
Dim objConnection As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sPathName &
";Extended Properties=Text;HDR=Yes")
Dim objCommand As New OleDbCommand("SELECT * FROM " & sFileName,
objConnection)
Dim ExcelAdapter As New OleDbDataAdapter(objCommand)
objConnection.Open()
thanks
a table
I have a date in this file ie
01012002
it is imported
1012002, stripping off the leading zero
I can't change the import file, that is the way is comes to me, but I need
to import the leading zero as well
how do I force it to give me exactly what is in the file, instead of making
the decision that it is a number and stripping the 0?
below is the code I am using
Dim objConnection As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sPathName &
";Extended Properties=Text;HDR=Yes")
Dim objCommand As New OleDbCommand("SELECT * FROM " & sFileName,
objConnection)
Dim ExcelAdapter As New OleDbDataAdapter(objCommand)
objConnection.Open()
thanks