Getting Exception 'Cannot convert '08/10/09' to a timestamp' while connecting to Sybase Database with .Net

泪湿孤枕 提交于 2019-12-11 06:20:09

问题


When I am trying to connect Sybase with c# by using AseClient, I am getting -

{"SQL Anywhere Error -157: Cannot convert '08/10/09' to a timestamp"} System.Exception {Sybase.Data.AseClient.AseException}

I dont know whats the reason

my code is:

var conn = new AseConnection();
conn.ConnectionString =
    "Data Source=myserver:port;" +
    "Initial Catalog=mydb;" +
    "User id=uid;" +
    "Password=pwd;";

conn.Open();

The error i am getting is Cannot convert '08/10/09' to a timestamp I haven't used the date '08/10/09' anywhere..

This is the stacktrace:

=== SQL Anywhere Error -157: Cannot convert '08/10/09' to a timestamp 
    at Sybase.Data.AseClient1.AseConnection.Open() 
    at Sybase.Data.AseClient.AseConnection.Open() 
    at SyBaseTest.Program.Main(String[] args) 
in D:\DotNet\RandD\SyBaseTest\Progr am.cs:line 60


回答1:


Problem with the Sybase DLL, Once changed the DLL and changed the Project version to 32bit, its working



来源:https://stackoverflow.com/questions/40930542/getting-exception-cannot-convert-08-10-09-to-a-timestamp-while-connecting-to

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!