问题
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