CSV file decimal value issue
I have a csv file with multiple columns. Some columns have numeric data with decimal having 2 to 10 decimal accuracy. When reading this file from ADODB record using VBA some column decimal values are getting picked correct but for some its only taking number (without decimal).
Column 1 value = 26.0123456789 (value can vary)
Column 2 value = 26.0123456789 (value can vary)
In the record object the value for column 1 is coming as 26.0123456789 but for column 2 is coming as 26
Using connection string as:
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Directory_Path & ";" & "Extended Properties=""Text;FMT=Delimited(,)"";"
Have you tried putting a schema.ini file in the folder.
It can contain specifications about your data.
[Data.csv] ColNameHeader=true MaxScanRows=0
MaxScanRows with value 0 in this case would cause the datatype guessing to scan all rows in the file.
Thanks for the reply. Yes I tried that yesterday and it worked like a charm. I went busy with other stuff so could not update here.
Thanks a lot for replying.
Include subfolders in data source path of Microsoft Access Text Driver
Hello, I have used the Connection String found here to connect to various txt files on my PC, located in C:\test\ This is working for this: Driver=Microsoft Access Text Driver (*.txt, *.csv);Dbq=C:\test;Extensions=txt;Format=Delimited1 vote1 answerFlorian Löffler4 days ago
ExecuteReader requires an open connection. The connection's current state is Closed.
DB2Connection Connection string is not working. Currently Im in .net core application and installed IBM.data.db2.core through NuGet package.0 votes1 answerAnonymous user4 days ago
how to read text from PDF document by using Angular
how to read text from PDF document by using Angular0 votes0 answersSiva Kumar4 days ago
read text in PDF using Angular
How to read text from PDF file in angular?0 votes0 answersSiva Kumar5 days ago
SSIS package with ODBC source Teradata Deployment issue
SSIS package works fine in Visual Studio, But when deployed it says gives error, SQL Jobs fails execution0 votes0 answersSandesh J2 weeks ago
JDBC additional parameters for Azure SQL
Hi, I am trying to connect my existing ETL application with Azure SQL Database. But since 29th July 2019, I am getting error Connection Reset/Connection is closed.0 votes0 answersTamanna Sharma2 weeks ago
proplem in connecting phpmyadmin database to asp.net mvc
add name="xyzEntities" connectionString="Data Source=188.8.131.52;port=3306;Integrated Security=false;Initial Catalog=database name;User Id=myname;password=mypass" providerName="MySql.Data.MySqlClient"/0 votes0 answersvivek kansal4 weeks ago
Can't connect to local Oracle 11g express
Hello. I have an Oracle 11g Express installation on my personal Windows 7 PC. Its DB name is the default - XE. I can connect to it in sqlplus just fine.1 vote1 answerJason Clements1 month ago
Connect to SQl with gMSA
I'm trying to make use of gMSA's to connect from ASP/X code to an MS SQL 2016 server. I've configured the gMSA with permissions on the target database and set up the gMSA on the source server, but can't get a connection string configured to use the account.0 votes0 answersSteve Sirag1 month ago
Connection String Not Working
I am new to SQL Connection strings. We recently migrated from SQL Server 2008 32 bit to SQL Server 2017 64 bit. The database I am using is an Access 2010 32 bit and we upgraded to Access 2013 32 bit. I believe the connection string that was being used for SQL Server 2008 32 bit was0 votes0 answersTheresa Draper1 month ago
- Load more posts