HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 26th, 2000, 08:13 PM
duellsy duellsy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: seymour, vic, australia
Posts: 12 duellsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to duellsy
I have a page that needs to have ASP to work, im usin asp to read from an 'access' database called 'mbdata.mdb' and i want the data to load onto the 'accommodation.asp' page, CAN U PLEASE HELP ME OUT, WHAT HAVE I DONE WRONG? to view the page, go to: http://www.ausclick.com/duellsy/index2.html
then click on find, then select accommodation
HERE IS THE 'ACCOMMODATION.ASP' PAGE:

<head>

<SCRIPT LANGUAGE="JavaScript">
function dropdownmenu(item){
window.location.href=item.options[item.selectedIndex].value;}
</SCRIPT>

<font color="red"><B>ACCOMMODATION </b></font><i>Your search has found <b>8</b> results<br></i>


<font size="5">
Other related searches <form name="menu1" align="left">
<select name="otherpages" size=1
onchange="dropdownmenu(document.menu1.otherpages)">
<OPTION VALUE="*">Select
<OPTION VALUE="../m/motels.html">Motels

</select>
<blockquote><font size="4">

<%
accessdb=server.mappath("mbdata.mdb")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & accessDB & ";"
'strconn=strconn & "USER ID=;PASSWORD=;"

mySQL="select * from accommodation"

call query2table(mySQL, strconn)
%>
<!--#include virtual="duellsy/table.asp"-->


AND HERE IS THE 'TABLE.ASP' FILE:

<%
sub query2table(inputquery, inputDSN)
dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection")
conntemp.open inputDSN
set rstemp=conntemp.execute (inputquery)
howmanyfields=rstemp.fields.count -1%>
<table border=1><tr>
<% 'Put headings on the table of the Field names
for i=0 to howmanyfields %>
<td><B><%=rstemp (i) .name%></b></td>
<% next %>
</tr>
<% ' Now lets grab all the records
do while not rstemp.eof %>
<tr>
<% for i = 0 to howmanyfields
thisvalue=rstemp(i)
If isnull (thisvalue) then
thisvalue="&nbsp;"
end If%>
<td valign=top><%=thisvalue%></td>
<% next %>
</tr>
<%rstemp.movenext
loop%>
</table>
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end sub%>

Reply With Quote
  #2  
Old December 27th, 2000, 02:14 PM
luciddream luciddream is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Ft. Lauderdale, FL, US
Posts: 29 luciddream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
%>
</table>
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end sub%>

should be:


%>
</table>
<%
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end sub%>

Reply With Quote
  #3  
Old December 27th, 2000, 11:48 PM
duellsy duellsy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: seymour, vic, australia
Posts: 12 duellsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to duellsy
Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/duellsy/table.asp, line 25


that is what comes up as the error, still
what can i do?

Reply With Quote
  #4  
Old December 28th, 2000, 11:20 AM
luciddream luciddream is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Ft. Lauderdale, FL, US
Posts: 29 luciddream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
umm, maybe try making end sub, End Sub...

i'm not very good with VBScript, but, i know that some one here: www.tek-tips.com


will be able to help you in the asp forum if that doesnt work.

Reply With Quote
  #5  
Old January 23rd, 2001, 01:36 PM
venvaithi venvaithi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 4 venvaithi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by luciddream
umm, maybe try making end sub, End Sub...

i'm not very good with VBScript, but, i know that some one here: www.tek-tips.com


will be able to help you in the asp forum if that doesnt work.


I think u r connection string is wrong it should be UId and PWD for user id and password
Please inform me if it works out
just try

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > ASP, DSNless connection, Database...HELP!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT