Skip to main content

DataSource.Error: ODBC: ERROR [HY000] Specified cast is not valid.  i have 8 table in my database but if i connect to a specific table then it gives this error                                                                                                           DataSource.Error: ODBC: ERROR �HY000] Specified cast is not valid.
Details:
    DataSourceKind=CdataMongodb
    DataSourcePath={"dsn":"CData Power BI MongoDB"}
    OdbcErrors=eTable]

@avtar Thank you for reaching out. This typically indicates that there is an issue with casting or determining data types. As the driver uses row scanning to determine what columns are present and what data types they have, if a column does not have a value of a data type in the first RowScanDepth rows, it may incorrectly the data type of the column. Could you please increase the RowScanDepth, which will cause more rows to be scanned, and should assist if the driver is incorrectly determining the data type? The documentation on this property is linked below.

https://cdn.cdata.com/help/DGH/odbc/RSBMongodb_p_RowScanDepth.htm

If the issue persists, as this issue appears to be more technical in nature, it would be helpful to have logging to troubleshoot this further. Please reach out to our support team at [email protected], who will be able to assist with this further.


Reply