Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception :[ODBC Driver Manager] Data source name too long  RSS feed

 
swarup reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I get the below error when i execute my JDBC code.

***Exception:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long

Below is the try block which results in the error



I have googled the error and found mention about SQL_MAX_DSN_LENGTH in sqlext.h . This header file exists in the dump, but is missing in the installed directory of SQL Server.

Can someone please explain the error.

Thanks
Swarup
 
Scott Selikoff
author
Bartender
Posts: 4084
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, this sounds like a software configuration issue rather a programming issue, you might try an MS support forum. All I can recommend is reinstalling SQL Server.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DSN is outside SQL Server's control so I don't know if a reinstall will help (also, this file is in none of the SQL Server installs I can currently see). What you could do it use a proper type 4 driver then you don't need DNS.
[ July 18, 2007: Message edited by: Paul Sturrock ]
 
swarup reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul, Scott
Thanks for your responses.
I shall try by modifying SQL_MAX_DSN_LENGTH in sqlext.h and then doing a reinstallation. But this is not a good idea because the program has to be run on the Server machine, where it can run into the same issue.

I shall try to follow paul's idea and check it out.

Thanks
Swarup
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!