|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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=" " 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%> |
|
#2
|
|||
|
|||
|
%>
</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%> |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
Quote:
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 |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > ASP, DSNless connection, Database...HELP!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|