Solved

Non standard DSN problem on win2k3 server

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now