connection problem

M

middletree

I'm really at a loss on this one. This thing was working just fine, then
stopped.

The site is http://www.shoppingwithshanda.com/shanda/shandahome.asp

All 6 pages are the same code, and that part in the middle, in the yellow,
is supposed to show the text that was placed in the Access database, in that
one field. I have another page for each of these 6 pages so that the client
can type in her info, which is updated frequently.

So here's my connection code:
From the main page:
<!-- #INCLUDE file="includes/shandadbinc.asp" -->

From the shandadbinc.asp file:
<!-- #Include file="adovbs.inc" -->
<%
strConnection ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="&server.mappath(".\shanda.mdb")&";User
Id=xxxxxxxx;Password=xxxxxxxx;"
filePath = Server.MapPath("xx.mdb")
%>

Finally, here's the code for the main page, which should show the contents
of the requested field:
<h2>Shoppingwithshanda.com is BACK!</h2>
<%
strHome = Replace(Replace(strHome,"''","'"),vbCrLf,"<br>")
response.write strHome
%>


Please note that I am aware that Access is not a good database, and I am
aware that sueing adovbs.inc has problems. It has not been a problem up till
this point, and if you think that one of those items is a factor for this
problem, then feel free to let me know. If not, please save that discussion
for another thread, please. I don't want to get sidetracked.

Also, please note that I have saved the db to my Hard drive, where I have
dsetermined that there is info in the fields. It is just not displaying.
 
M

middletree

I should have added this, in an include file that all pages are using:

<% Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString = strConnection
objConnection.Open

strSQL = "select * from Shandamain "
set rs = objConnection.execute (strSQL)
strScoop = rs("Scoop")
strScoop = Replace(strScoop,"<br>",vbCrLf)

strNews = rs("News")
strNews = Replace(strNews,"<br>",vbCrLf)

strHome = rs("Home")
strHome = Replace(strHome,"<br>",vbCrLf)


strAbout = rs("About")
strAbout = Replace(strAbout,"<br>",vbCrLf)

strSeminar = rs("Seminar")
strSeminar = Replace(strSeminar,"<br>",vbCrLf)

strCutie = rs("Cutie")
strCutie = Replace(strCutie,"<br>",vbCrLf)

set rs = nothing
set ObjConnection = nothing
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top