# SQL Analysis Services JDBC Driver detects all column as VARCHAR

**URL:** <https://community.cdata.com/t/sql-analysis-services-jdbc-driver-detects-all-column-as-varchar/546>\
**Category:** CData Drivers\
**Tags:** question, driver\
**Created:** [December 1, 2023, 9:38am UTC](https://community.cdata.com/t/sql-analysis-services-jdbc-driver-detects-all-column-as-varchar/546 "2023-12-01T09:38:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quangdutran809](https://avatars.discourse-cdn.com/v4/letter/q/439d5e/32.png) [@quangdutran809](https://community.cdata.com/u/quangdutran809)\
**Post date:** [December 1, 2023, 9:38am UTC](https://community.cdata.com/t/sql-analysis-services-jdbc-driver-detects-all-column-as-varchar/546/1 "2023-12-01T09:38:24Z")

</div>

Hi Cdata folks,

Cdata driver latest version v23

Weird thing is that&nbsp;SQL Analysis Services JDBC Driver detects all column as VARCHAR no matter what type of the model column:

This is the model in Visual Studio:

 ![4d6064a0-4e41-4971-8403-8673bbb34bcd.png](https://us1.discourse-cdn.com/cdata/original/2X/d/d622dde518c364e72cb5c6ed55b5e6696694d677.png)

Before importing, the data type is also detected correctly in Visual Studio:

 ![1e51521e-1603-44c0-b3cd-e39b866b0528.png](https://us1.discourse-cdn.com/cdata/original/2X/b/b61ab456a2f9598ddb808a600aa0b082cdce3aee.png)

But in meta data, type for all columns is VARCHAR  
This is how I get the metadata:

```java
Connection conn = DriverManager.getConnection("jdbc:ssas:AuthScheme=BASIC;User=user;Password=pwd;URL=http://HOST/OLAP/msmdpump.dll;");Statement stat = conn.createStatement();DatabaseMetaData databaseMetaData = conn.getMetaData(); try(ResultSet columns = databaseMetaData.getColumns("TabularProject3","Model","Table","integer")){ while(columns.next()) { System.out.println(columns.getString("COLUMN_NAME")); System.out.println(columns.getString("DATA_TYPE")); System.out.println(columns.getString("COLUMN_SIZE")); System.out.println(columns.getString("TYPE_NAME")); } }

```

In document, there is no other connection string param that I think can apply to change how Cdata driver detects column type.Am I missing anything else?

---

<div class="post-metadata">

**Author:** ![ekanshd](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@ekanshd](https://community.cdata.com/u/ekanshd)\
**Post date:** [January 4, 2024, 6:00am UTC](https://community.cdata.com/t/sql-analysis-services-jdbc-driver-detects-all-column-as-varchar/546/2 "2024-01-04T06:00:53Z")

</div>

Hello @quangdutran809 &nbsp;, we’re trying to reproduce the issue on our end. Meanwhile could you please send us the verbosity 5 logfile so that we can better troubleshoot the issue? To generate the logs,

please set the following connection properties on the connection manager/JDBC URL and send it to us:  
-Set “Logfile” to an accessible valid file (i.e C:\Users\\<user\>\Desktop\logfile.txt).  
-Set “Verbosity” to 5.

This log file will allow us to see exactly what data is being sent between our driver and the data source, which will give us a better idea of what may be causing the issue. It also includes the full response from the data provider. Knowing this will let me have a much better idea of what exactly the issue is, and how to best go about resolving it. Rerun the query and send us the resulting log so that I can narrow down the issue.

Also, you can email us the logfiles and other details at [support@cdata.com](mailto:support@cdata.com)&nbsp;which would make the process much easier for us.
