Google Answers Logo
View Question
 
Q: Asp problems on brinkster ( No Answer,   9 Comments )
Question  
Subject: Asp problems on brinkster
Category: Computers > Programming
Asked by: steven1981-ga
List Price: $20.00
Posted: 06 Jan 2005 05:21 PST
Expires: 05 Feb 2005 05:21 PST
Question ID: 452906
hi, i am trying to piece together a website i have been given. it has
been taken off a server, and now i am trying to put it back together.
i have set up my brinkster account, and have followed all the
tutorials on how to link my database's. all the asp and html has been
pulled from a working website, i just can not get it to run. is there
anyone that can help me? if you think you can i will give you the code
to look at, then we can take it from there. im sure to many people it
is just a simple matter of correcting a few lines, but to me it has
taken over my life.

Clarification of Question by steven1981-ga on 06 Jan 2005 17:11 PST
ok, i have two folders in root directory, database and webroot.
obviously i have my database in the database directory. within the
webroot folder i have a folder called connections. within this code
lies connshoes.asp;

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connshoes_STRING
MM_connshoes_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
& Server.MapPath("\thehotspotuk\db\shoes.mdb")
%>



also in the webroot directory i have a folder called asp. this is
where i keep all my asp pages. the page that i am struggling with is
products.asp;

<% Response.Buffer=True %>
<%
Kind=Request("Kind")
if Kind="" or isempty(Kind) then
   Kind="New Kinds"
end if

if not isempty(request("page")) then
pagecount=cint(request("page"))
else   
pagecount=1   
end if
%>
<!--#include virtual="/connections/connshoes.asp"-->
<%
set rsKinds=server.createobject("adodb.recordset")
if Kind="New Kinds" then
sqlKinds="select * from shoes where  Catalogt='New' order by name"
elseif Kind="Stocking" then
sqlKinds="select * from shoes where  Catalogt='stocking' order by name"
elseif Kind="Popular" then
sqlKinds="select * from shoes where  Catalogt='Popular' order by name"
else
sqlKinds="select * from shoes where Kind='"&Kind&"'"&" order by name"
end if
rsKinds.open sqlKinds,conn,1,1
if rsKinds.bof and rsKinds.eof then
   response.write"<SCRIPT language=JavaScript>alert('No information in
database. Check here return. Thanks.');"
   response.write"javascript:history.go(-1)</SCRIPT>"
   response.End
end if

if request("result_num")<>"" then
result_num=request("result_num")
rsKinds.pagesize=cint(result_num)
else
result_num=8
rsKinds.pagesize=8
end if

if pagecount>rsKinds.pagecount or pagecount<=0 then              
pagecount=1              
end if              
rsKinds.AbsolutePage=pagecount

page_start=(pagecount-1)*rsKinds.pagesize+1
page_end=page_start+rsKinds.pagesize-1
if pagecount=1 then
page_start=1
qs_serialNum=page_start
page_end=rsKinds.pagesize*pagecount
end if

if pagecount*rsKinds.pagesize=>rsKinds.recordcount then
page_end=rsKinds.recordcount
end if
%>
<html>
<head>
<title>CALLV International Trading Inc.-------Wholesale all kinds of items.</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
<!--

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}

function jumppage(pageno){
  document.formJumpPage.Page.value=pageno;
  document.formJumpPage.submit();
}

function jumppage2(result_num){
  document.formJumpPage.Page.value=1;
  document.formJumpPage.result_num.value=result_num;
  document.formJumpPage.submit();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

<link href="../style.css" rel="stylesheet" type="text/css">
<meta name="Author" content="Xiamen XuYing Technology;QiuQin
Design;xuying.net;qiuqin.com;chrysan@xuying.net;Chrysan Zhu">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" background="../image/bg_01.gif" text="#666666"
link="#6666CC" vlink="#CC3366" alink="#FFCC00"
onLoad="MM_preloadImages('../image/bt_01_on.gif','../image/bt_02_on.gif','../image/bt_03_on.gif','../image/bt_04_on.gif','../image/bt_05_on.gif','../image/visited_on.gif')">
<table width="646" border="0" cellspacing="0" cellpadding="0"
align="center" height="100%">
  <tr>
    <td bgcolor="#99CC66" valign="top"> 
      <table width="646" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="../image/obj_topimage_01.jpg"
align="right"><a href="http://www.ems.com.cn"><img
src="../image/obj_sitemap.jpg" width="74" height="18"></a><a
href="mailto:epifa_cn@hotmail.com"><img src="../image/obj_mail.jpg"
width="57" height="18"></a></td>
        </tr>
        <tr>
          <td><img src="../image/obj_topimage_02.jpg" width="646"
height="120"></td>
        </tr>
        <tr>
          <td background="../image/bg_02.gif">
            <table width="646" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="14"><img src="../image/spacer.gif"
width="14" height="1"></td>
                <td width="130"><img src="../image/obj_sitetitle.gif"
width="200" height="18"></td>
                <td align="right">
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><a href="../index.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu01','','../image/bt_01_on.gif',1)"><img
name="menu01" border="0" src="../image/bt_01_off.gif"
height="19"></a></td>
                      <td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
                      <td><a href="about.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu02','','../image/bt_02_on.gif',1)"><img
name="menu02" border="0" src="../image/bt_02_off.gif"
height="19"></a></td>
                      <td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
                      <td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu03','','../image/bt_03_on.gif',1)"><img
name="menu03" border="0" src="../image/bt_03_off.gif"
height="19"></a></td>
                      <td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
                      <td><a href="contact.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu04','','../image/bt_04_on.gif',1)"><img
name="menu04" border="0" src="../image/bt_04_off.gif"
height="19"></a></td>
                      <td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
                      <td><a href="freight.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu05','','../image/bt_05_on.gif',1)"><img
name="menu05" border="0" src="../image/bt_05_off.gif"
height="19"></a></td>
                      <td width="10"><img src="../image/spacer.gif"
width="10" height="1"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td><img src="../image/obj_topimage_03.gif" width="646" height="16"></td>
        </tr>
      </table>
	  <table width="644" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
                <td width="15"><img src="../image/spacer.gif"
width="15" height="1"></td>
                
          <td width="194" valign="top"><img
src="../image/ba_profile.gif" width="174" height="29">
            <br>
            <table width="175" height="25" border="0">
              <tr> 
                <td><a href="Order.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu_visit','','../image/visited_on.gif',1)"><img
name="menu_visit" border="0" src="../image/visited.gif" width="100%"
height="25"></a></td>
              </tr>
            </table>
            <br> 
            <!--include virtual="/asp/ProList.asp" -->
            <br>
            <br>
          </td>
                <td valign="top"> <br>
            <strong><font size="4" face="Verdana, Arial, Helvetica,
sans-serif, Times New Roman, ËÎÌå"><%=Kind%></font></strong><br>
<%
i=1
ii=page_start+1
do while not rsKinds.eof
%><br>
            <table width=100% border=0 cellspacing=2 cellpadding=0 align=center>
              <tr> 
                <td width="49%" valign="top"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="90" align="center" valign="top"><a
href="#" onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"><img
src=".<%=rsKinds("File name")%>" width="80" height="60"
border="0"></a></td>
                      <td valign="top"><a href="#"
onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"
class=TopL><%=rsKinds("Brand")%>&nbsp;<%=rsKinds("Name")%></a><%if
rsKinds("Catalogt")="New" then%><img src="../image/isnew.gif"
border="0"><%elseif rsKinds("Catalogt")="Popular" then%><img
src="../image/ishot.gif" border="0"><%end if%><br>
                        Colorset:<%=rsKinds("Colorset")%><br>
                        Size:<%=rsKinds("Size")%><br></td>
                    </tr>
                  </table></td>
<%
if ii>rsKinds.recordcount then
else
rsKinds.movenext
i=i+1
ii=ii+1
%>
                <td width="49%" valign="top"><table width="100%"
border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="90" align="center" valign="top"><a
href="#" onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"><img
src=".<%=rsKinds("File name")%>" width="80" height="60"
border="0"></a></td>
                      <td valign="top"><a href="#"
onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"
class=TopL><%=rsKinds("Brand")%>&nbsp;<%=rsKinds("Name")%></a><%if
rsKinds("Catalogt")="New" then%><img src="../image/isnew.gif"
border="0"><%elseif rsKinds("Catalogt")="Popular" then%><img
src="../image/ishot.gif" border="0"><%end if%><br>
                        Colorset:<%=rsKinds("Colorset")%><br>
                        Size:<%=rsKinds("Size")%><br></td>
                    </tr>
                  </table></td>
<%end if%>
              </tr>
            </table>
<%
i=i+1
ii=ii+1
qs_serialNum=qs_serialNum+1
rsKinds.movenext
if i>=rsKinds.PageSize then exit do 
loop
%>
            <br>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="right">Total:<span
class="red"><%=rsKinds.recordcount%></span>Items. View:<span
class=red><%=page_start%>~<%=page_end%></span>Item. Page:<span
class=red><%=pagecount%></span>/<%=rsKinds.pagecount%>&nbsp;
                  <%if pagecount=1 and rsKinds.pagecount=pagecount
then%><% end if%>
				  <%if pagecount=1 and rsKinds.pagecount<>pagecount then%><a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount+1)%>&result_num=<%=result_num%>">[Next]</a><%
end if %>
				  <% if rsKinds.pagecount>1 and rsKinds.pagecount=pagecount then
%><a href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount-1)%>&result_num=<%=result_num%>">[Previous]</a><%end
if%>
				  <%if pagecount<>1 and rsKinds.pagecount<>pagecount then%><a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount-1)%>&result_num=<%=result_num%>">[Previous]</a>&nbsp;<a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount+1)%>&result_num=<%=result_num%>">[Next]</a><%end
if%>
				  <br><%if rsKinds.PageCount>1 then%> <select class="input"
name="gopage" onChange="javascript:jumppage(this.value);">
                    <option>Go to</option>
                    <%
soonhost=0
DO WHILE NOT soonhost = rsKinds.PageCount %>
                    <option value="<% =soonhost+1 %>">Page <%
=soonhost+1 %></option>
                    <% soonhost=soonhost+1
loop
%>
                  </select> <%end if%><%if rsKinds.recordcount>10
then%> <select class="input" name="gopage2"
onChange="javascript:jumppage2(this.value);">
                    <option>View ever page</option>
                    <option value="4">4 Items/Page</option>
                    <option value="8">8 Items/Page</option>
                    <option value="12">12 Items/Page</option>
                    <option value="16">16 Items/Page</option>
                    <option value="20">20 Items/Page</option>
                    <option value="30">30 Items/Page</option>
                    <option value="40">40 Items/Page</option>
                    <option value="50">50 Items/Page</option>
                  </select>
                    <%end if%></td>
              </tr>
            </table> </td>
                <td width="15"><img src="../image/spacer.gif"
width="15" height="1"></td>
              </tr><form name="formJumpPage" method="post" action="products.asp">
              <input type=hidden name="Page" value="">
			  <input type=hidden name="Kind" value="<%=Kind%>">
              <input type=hidden name="result_num" value="<%=result_num%>">
            </form>
            </table>
      <table width="646" border="0" cellspacing="0" cellpadding="0" background="">
        <tr> 
          <td bgcolor="#99CC66" width="1"><img
src="../image/spacer.gif" width="1" height="1"></td>
          <td width="644" bgcolor="#FFFFFF"></td>
          <td bgcolor="#99CC66" width="1"><img
src="../image/spacer.gif" width="1" height="1"></td>
        </tr>
      </table>
       <table width="644" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="../image/obj_footer.gif" width="646" height="16"></td>
        </tr>
        <tr>
          <td align="center" class="small_white">Copyright ©2004 CALLV
            International Trading Inc.All rights reserved</td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
</table>
</body>
</html>



i know that all the links to the images are missing, but this should
not be a problem should it?

Clarification of Question by steven1981-ga on 06 Jan 2005 17:26 PST
the line that is identified as the problem is;

rsKinds.open sqlKinds,conn,1,1
Answer  
There is no answer at this time.

Comments  
Subject: Re: Asp problems on brinkster
From: ch1marketing-ga on 06 Jan 2005 05:53 PST
 
i can help you with your problem, please let me know if i can be of assistance
Subject: Re: Asp problems on brinkster
From: steven1981-ga on 06 Jan 2005 06:04 PST
 
great, can i get in contact with you via asp?
Subject: Re: Asp problems on brinkster
From: steven1981-ga on 06 Jan 2005 06:05 PST
 
i meant "can i get in contact with you by msn messenger? this is
seriously turning me crazy
Subject: Re: Asp problems on brinkster
From: steven1981-ga on 06 Jan 2005 07:12 PST
 
please, anybody. i need help. i will throw another $20 in if i can get
the site up and running tonight
Subject: Re: Asp problems on brinkster
From: rbanyal-ga on 06 Jan 2005 16:54 PST
 
Please post YOUR code here. Thanks
Subject: Re: Asp problems on brinkster
From: hyespirit-ga on 05 Feb 2005 17:21 PST
 
if you say it worked before on brinkster, i suppose you had an
educational account. The database directory structure on brinkster is
different between a educational and premium users.

Make sure that when you update the account type from educational to
paid, you update it to at least the second option (7 something for
12mo) on brinkster. The chipper one doesn't support asp

Now if this is the only page that uses the database access you're in
luck, if not you're going to modyfy all pages one by one. Cuz your
coding looks like a spaggety soup and is not quite reusable

Anyway change the first part of the page to
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connshoes_STRING

'''''''''''''''''''''''''''''
'Get Webroot and Dbroot physical path
'''''''''''''''''''''''''''''
Dim WebRoot, DbRoot
WebRoot=server.mappath("\") ' get webroot
if right(WebRoot,1)="\" then WebRoot=left(WebRoot,Len(WebRoot)-1)
'prepare webroot for dbroot
DbRoot=cstr(left(WebRoot,instrrev(WebRoot,"\")) & "database\") ' get dbroot
if right(WebRoot,1)<>"\" then WebRoot=WebRoot & "\" ' format webroot
to end with "\"
if right(DbRoot,1)<>"\" then DbRoot=DbRoot & "\" ' format dbroot to end with "\"
''''''''''''''''''''''''''''''

MM_connshoes_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
& DbRoot & shoes.mdb")
%>
Subject: Re: Asp problems on brinkster
From: hyespirit-ga on 05 Feb 2005 17:23 PST
 
for some reason a line break was inserted in the page.

the 

& DbRoot & shoes.mdb")

part should continue from last line
Subject: Re: Asp problems on brinkster
From: hyespirit-ga on 05 Feb 2005 18:51 PST
 
why don't you post the connections.asp also
Subject: Re: Asp problems on brinkster
From: steven1981-ga on 07 Feb 2005 07:06 PST
 
Thanks for your advice hyespirit-ga. i am just in the final stages of
having a website built for me, do you think it would be possible for
you to help me post it on brinkster? i will obviously pay you for your
help? if you can please drop me a line at ukcallv at gmail dot com.

cheers

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy