If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > DSN Connetion error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-04, 03:22
li__lu li__lu is offline
Registered User
 
Join Date: Mar 2004
Posts: 7
DSN Connetion error

I made a site by using asp+access.

When I use the system DSN, the site run in gear. But it doesn't work in user DSN mode. What can I do next?

The following is a part codes of the site about connection the DSN:
---------------------
<%Pid = Request.Cookies("Pid")
SRNO=Request("sr")
Set connTemp = Server.CreateObject("ADODB.Connection")
connTemp.Open "shenrong","",""
Set rsTemp = Server.CreateObject("ADODB.Recordset")
sql = "Select * from product Where SRNo='"&SRNo&"'"
rsTemp.Open sql,connTemp,1,1,1%>

<style type="text/css"><!--
.style1{
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;}
--></style><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Shenrong Accessorize</title></head>
<body style="margin:0px"><center>
<table width="560" border="0" cellspacing="0" cellpadding="0">
<tr><td width="400" valign="middle">
<div align="center"><img src="../products/<%=rsTemp("SRNo")%>.jpg" border="0"></div>
</td><td width="20"> </td><td width="100">
<span class="style1">SR No.: <%=rsTemp("SRNo")%><br>Description: <%=rsTemp("Descr")%><br><br><a href="plugin/mooop.asp?sr=<%=SRNo%>">
<font color="#009900">Add To MOO</font></a></span></td><td width="20">
</td></tr><%rsTemp.close
connTemp.close%><tr><td> </td><td> </td><td> </td><td> </td></tr></table></center></body></html>
Reply With Quote
  #2 (permalink)  
Old 03-25-04, 03:23
li__lu li__lu is offline
Registered User
 
Join Date: Mar 2004
Posts: 7
Thank u
Reply With Quote
  #3 (permalink)  
Old 03-25-04, 19:51
li__lu li__lu is offline
Registered User
 
Join Date: Mar 2004
Posts: 7
rewrite
connTemp.Open "DSN=shenrong;UID=;PSW=;"

it can work in system DSN but not in user DSN
Reply With Quote
  #4 (permalink)  
Old 03-31-04, 23:13
mingkeat mingkeat is offline
Registered User
 
Join Date: Mar 2004
Location: Malaysia
Posts: 1
how to set up the DSN for ms access for the use of asp.net web matrix?

Hi there..

when im running the whole thing in localhost, there is no problem..problems started when the thing is uploaded to the server..
every pages concerning with database cannot be loaded..
help pls

thanx a million
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On