Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 679
  • Last Modified:

invalid file dsn problem

hi ppl, i need help in the following issue.

we have a web application KService running on our w2k web
server SVR21. in KService we use a file DSN to connect to
database, and the file is here: "C:\Program Files\Common
Files\ODBC\Data Sources\KCONN.DSN". not frequently, one
per month, we will encounter the "invalid file dsn
problem", which said that "KCONN.DSN" was an invalid file
dsn. if we restart IIS service, the problem goes away. we
can also wait for hrs, the problem goes itself.

can any1 advise me on this issue? any wrong doing i may
have done to the server or to the application?

Thanks very much!
0
timothymo
Asked:
timothymo
  • 2
1 Solution
 
AndresMCommented:
Instead of using a dsn, have you tried an explicit connection string ?
0
 
timothymoAuthor Commented:
as we have other concerns, file dsn is the only way we could accept.

definitely, connect string or system dsn will work.
0
 
hakyemezCommented:
Open Registry Editor
Goto
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN
Create NewString Value
Name  = DefaultDSNDir
Value = C:\Program Files\Common Files\ODBC\Data Sources

or

Copy below text open note pad paste it here and save document as dns.reg and run it

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN]
"DefaultDSNDir"="C:\\Program Files\\Common Files\\ODBC\\Data Sources"

0
 
timothymoAuthor Commented:
i checked the registry in the server, it does have this registry entry, with the value you mentioned above.

Now what i suspect is that at the time the problem came, the server had problem to get this value. i cant verify this until it happens again. also, the server registry may somehow got problem.

Thanks for the information!!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now