Solved

Non standard DSN problem on win2k3 server

Posted on 2008-06-26
5
277 Views
Last Modified: 2008-07-11
I'm getting the dsn not found thang, but I'm a pro - the connection works in odbc manager, but I can't get any page on the server to hook up with a dsn. Its a new server, the same code used to work fine on the old server. Could it be something in MSDE / sqlserver express thats preventing the dsn being recognised? Do certain extra permissions need enabling? It's got me stumped!
<%@LANGUAGE="VBSCRIPT"%>
 
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connArtsvibe_STRING
MM_connArtsvibe_STRING = "dsn=dsnRelishSafe;"
%>
 
<%
Dim rsArtvibes
Dim rsArtvibes_numRows
 
Set rsArtvibes = Server.CreateObject("ADODB.Recordset")
rsArtvibes.ActiveConnection = MM_connArtsvibe_STRING
rsArtvibes.Source = "SELECT *  FROM orders"
rsArtvibes.CursorType = 0
rsArtvibes.CursorLocation = 2
rsArtvibes.LockType = 1
rsArtvibes.Open()
 
rsArtvibes_numRows = 0
%>

Open in new window

0
Comment
Question by:Bigimpact
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:dosth
ID: 21873399
in your code where you are opening connection to the database some thing like

      set Connection = Server.CreateObject("ADODB.Connection")
      Connection.Open MM_connArtsvibe_STRING
0
 

Author Comment

by:Bigimpact
ID: 21897377
The server simply doesn't recognise my DSN. I have changed code to this:

<%@LANGUAGE="VBSCRIPT"%>
<%
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "DSN=dsnRelishSafe;"
objConnection.Close
%>

I get the same error, dsn not found, yet the system dsn works and connects fine in odbc management.
0
 
LVL 15

Assisted Solution

by:dosth
dosth earned 125 total points
ID: 21897488
try using normal connection string instead of DSN, if that works we can try some thing to digg with DSN
0
 

Accepted Solution

by:
Bigimpact earned 0 total points
ID: 21924163
sorry, was away a few days. I've found the problem - a smegging virus my software wasn't picking up. Thx for help.
0
 
LVL 15

Expert Comment

by:dosth
ID: 21980504
thanks for the points
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question