TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sarika k
NA
16
0
.Net Entity Framework to DB2
Mar 29 2011 2:54 PM
Hi,
I am trying to connect to the DB2 from entity frame work (.Net 3.5. using Db2 add-ins). But it throws the following error: Does any one know how to fix this.
---------------------------
Microsoft Visual Studio
---------------------------
An error occurred while connecting to the database. The database might be unavailable. An exception of type 'System.Data.EntityCommandExecutionException' occurred. The error message is: 'An error occurred while executing the command definition. See the inner exception for details.
The inner exception caught was of type 'IBM.Data.DB2.DB2Exception', with this error message: 'ERROR [42622] [IBM][DB2] SQL0107N The name "RETURNDATETIMEPRECISION" is too long. The maximum length is "18". SQLSTATE=42622
'.'.
Reply
Answers (
6
)
0
matt cupryk
0
29
0
Apr 8 2011 1:38 PM
this can be because of the dateformat in windows. check it out. I've seen this before.
0
Sarika k
0
16
0
Apr 1 2011 6:21 PM
I found the problem, I am trying to connect to the older version of DB2 on Mainframe, which is not supported by entity frame work.
anyway thanks for your help Suthish.
0
Sarika k
0
16
0
Mar 31 2011 2:25 PM
I just checked the Tables check box in the wizard to connect to the db, to get all the tables in that database. but it fails t retreive the table with that error.
0
Suthish Nair
0
30.5k
7.2m
Mar 30 2011 11:17 AM
how you retreiving the table data, using stored procedure?
0
Sarika k
0
16
0
Mar 29 2011 5:09 PM
I haven't created any methods yet, I am just trying to connect to the existing DB2 database, throught Entity frame work, on the wizard I enetered the connection string, connection was successful but it fails before retreiving the tables from DB2 with that error.
0
Suthish Nair
0
30.5k
7.2m
Mar 29 2011 4:38 PM
Because your method name (RETURNDATETIMEPRECISION) is too long. The error 42622 explains that. Use a shorter name for the object.
How to turn image on itself so only edge is seen?
How to insert data in two dependent table through one query in C#