connection problem

Discussion in 'ASP General' started by middletree, Oct 24, 2005.

  1. middletree

    middletree Guest

    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.
     
    middletree, Oct 24, 2005
    #1
    1. Advertising

  2. middletree

    middletree Guest

    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
    %>
     
    middletree, Oct 24, 2005
    #2
    1. Advertising

  3. middletree

    middletree Guest

    Never mind. Seems that one of the files was lost by Dreamweaver.


    "middletree" <> wrote in message
    news:...
    > 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.
    >
    >
     
    middletree, Oct 24, 2005
    #3
  4. See if one of the files was lost by Dreamweaver.

    ;]

    Ray at work

    "middletree" <> wrote in message
    news:...
    > 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.
     
    Ray Costanzo [MVP], Oct 24, 2005
    #4
  5. middletree

    middletree Guest

    > See if one of the files was lost by Dreamweaver.


    8)
     
    middletree, Oct 24, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mythran
    Replies:
    5
    Views:
    5,006
    Mythran
    Oct 5, 2005
  2. Dave Johnson

    Using Connection Class VS Connection Module

    Dave Johnson, Dec 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    660
    Dave Johnson
    Dec 11, 2005
  3. Linus Nikander
    Replies:
    5
    Views:
    566
  4. Replies:
    3
    Views:
    40,683
    Roedy Green
    Nov 16, 2005
  5. R
    Replies:
    1
    Views:
    593
Loading...

Share This Page