简体   繁体   中英

IBM.Data.DB2.iSeries SQL0180 error

I'm attempting to connect to IBM.Data.DB2.iSeries database via a .NET application and am receiving the following error when executing a DB2 stored procedure: "SQL0180 Syntax of date, time, or timestamp value not valid."

However, when i run the same stored procedure in the IBM Data Studio i get no error and it successfully returns a from the execution of the stored procedure. This leads me to believe it may be a driver issue and i'll need to update it. Has anyone ran into this issue before and was it a driver update that fixed it?

I have faced similar issue in past.What you need to do is that in your connection string you need to specify the date format. We use *ISO so we add the below in our connection string

date format=iso 

This should solve your date/timestamp issues.

What version of OS400 is running on the host? I had date issues with V6R1. Updating to the latest Client Access PTF fixed them.

The default path for the tool will include your username in it. It then takes that username and looks for data inside a library of the same name. If there are no libraries with the name being the username then it will fail. Two solutions: modify the default path to not include the username, or to add a library of the username.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM