Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Non standard DSN problem on win2k3 server

Posted on 2008-06-26
5
Medium Priority
?
285 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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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