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).
Example: 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.
Connect with ODBC ( Power Query Excel)
I'm trying to connect ODBC database by excel power query, but it's not works. When I try in Windows 7, its works, but in Windows 10, I'm facing problem.0 votes0 answersunknown7 days ago
Excel 2016 VBA OLE SQL connection help
Excel 2016 VBA to create an OLE connection to a sql 2014 db and then execute a stored procedure returning the results starting cell A1 on sheet :StoredProcData. Server & instance is QGZZZ\MYINSTANCE db is data0 votes0 answersRichard1 week ago
SQL Anywhere 17 Connection String without DSN
I'm doing .Net (C#) development on my mac (with Visual Studio for Mac). My app needs to access a SQL Anywhere 17 backend. I have installed SQL Anywhere, and I can connect directly to my databases from SQL Central. I have been unable to successfully create a DSN.0 votes0 answersMatt S1 week ago
Connection String Problem to postgresql from C# application
I am trying to connect to a Local postgresql Database Version 9.5.1 from a C# application My connection String and call statement are shown below:0 votes0 answersKayode Oluwole2 weeks ago
DSUSRL option do not find my Sybase ASE server
Hi, I'm trying to connect to Sybase ASE 15 using ADO.net in a Powershell script At the beginning of the shell I got the load of the DLL : Add-Type -AssemblyName "Sybase.AdoNet2.AseClient, Version=2.157.1330.0, Culture=neutral, PublicKeyToken=XXXXXX"1 vote1 answerZion Assedo3 weeks ago
Public fields to Dbase
I am currently using Foxpro 9. In my program I am using several defined Public fields. I need to output these fields in a excel file or I can move them to a DBase file, then generate the spread sheet.0 votes0 answersDale Lacy1 month ago
how to use regional settings when connecting to SQL Server with a connection string? Is there a parameter for it?
How do i specifiy to use the regional settings (those settings in Windows control panel) for numbers, dates and currency? When defining a DSN connection in ODBC manager Windows i can check to use the regional settings.0 votes0 answersMatthias Rebbe1 month ago
Difference between OraOLEDB.Oracle and OraOLEDB.Oracle.1
What is the different between these two connection strings? Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername; Password=myPassword; Provider=OraOLEDB.Oracle.1;Data Source=MyOracleDB;User Id=myUsername;0 votes1 answerTwenty Dily1 month ago
Connecting to Oracle using python's pyodbc library
I am trying to connect to Oracle 12c R1 using the python library pyodbc. I am having zero luck. Can anybody help? thx in advance!0 votes0 answerstodd Turczynski1 month ago
connecting string not working for informix DSN
Hi All I have informix DB and I am connecting to the database using ODBC Query tool through DSN connection. I can connect to database using dsn without username and password but I can't connect if I give the same settings in the connection string.0 votes0 answersunknown1 month ago
- Load more posts