Solved

Non standard DSN problem on win2k3 server

Posted on 2008-06-26
5
275 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cassandra Select Query 1 75
Question about DB Schema 27 53
ASP/VB email question 4 34
MySQL Query Using Up Memory 6 26
This article describes some very basic things about SQL Server filegroups.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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…

770 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