Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I use Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=""text;HDR=No;FMT=Delimited'"""
I get the values from the fields but if the data is decimal/double they are truncated to integers. How to avoide this? Do you have any ideas? Thanks for any suggestions.
Posted
Comments
Sandeep Mewara 27-Oct-10 6:34am    
Is it OLEDB connection thing or query?

Are you going to read the text/csv from using OBLDB..,

Here is the link for connection string for text files

http://connectionstrings.com/text[^]

can you clear me how you are getting the fields data.. ???
 
Share this answer
 
I use it like this, and it works without any truncation.

VB
Dim da As New OleDbDataAdapter("select * from [x.txt]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=""text;HDR=No;FMT=Delimited""")
Dim ds As New dataset
da.Fill(ds)



contents in c:\x.txt
---------------------
1,prerak,400,12.50
2,patel,500,12.00
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900