cancel
Showing results for 
Search instead for 
Did you mean: 

How to change a database field type that is wrong?

Former Member
0 Kudos

I connected to a MSSQL database view, which has a column that is datetime2 type, but in crystal reports the field type is string. how do I change it to be date/time?

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Which version of the following are you using:

Crystal (get the exact version number from Help>>About)

SQL Server

SQL Server client

Also, what type of connection are you using - ODBC or OleDB?

-Dell

Former Member
0 Kudos

Thank you for the reply.

CR Version 14.1.4.1327

SQL Server 2008 (I think)

SQL Client version 6 (I think)

Conection type is OleDB

Unfortunately I am not able to be in front of the system at the moment so I am relying on memory for some of this information.

DellSC
Active Contributor
0 Kudos

The version of the SQL Server client that you're using, if it is indeed v6, is old and does not recognize the datetime2 data type.  You need to install the SQL Server Native Client 10.0 and use that for your OleDB connection - at that point the field type should be correct in your report.

-Dell

Former Member
0 Kudos

Thank you!

Next time I am onsite I will try that.

Answers (0)