Hi there,
I have a prob within my ASP-Pages. "page1.asp" (see code below) contains a form with dropdowns sourced from a access database table (tbl_country). I post the selected country (that's the content of the dropdown) to "page2.asp" (see code below). Within "page2.asp" serveral information about the country will (at the moment should) be displayed. The content of "page2.asp" is sourced out of a query stored in the same access database. The following error message appears. What did I wrong or what do I have to do?
The error message
Kompilierungsfehler in Microsoft VBScript- Fehler '800a03ea'
Syntax Error
/iisHelp/common/500-100.asp, line 129
elseIf (objASPError.Description > "" Then
^
Microsoft OLE DB Provider for ODBC Drivers- Fehler '80040e10'
[Microsoft][ODBC Microsoft Access Driver] 1 Parameter wurden erwartet, aber es wurden zu wenig Parameter übergeben.
/gxinternet/cont_topic/31contr.asp, line 26 <-- that's the "set rstEntry = objConn.execute(strSQL)" line.
The code "page1.asp"
The code "page2.asp"
- - - - - - - - - - - - - - - - - - - - - - - - -
Can't find the bug. Thanks in advance for you help.
Dani
(BTW, i'am nearly an ASP Beginner. Sorry,...)
I have a prob within my ASP-Pages. "page1.asp" (see code below) contains a form with dropdowns sourced from a access database table (tbl_country). I post the selected country (that's the content of the dropdown) to "page2.asp" (see code below). Within "page2.asp" serveral information about the country will (at the moment should) be displayed. The content of "page2.asp" is sourced out of a query stored in the same access database. The following error message appears. What did I wrong or what do I have to do?
The error message
Kompilierungsfehler in Microsoft VBScript- Fehler '800a03ea'
Syntax Error
/iisHelp/common/500-100.asp, line 129
elseIf (objASPError.Description > "" Then
^
Microsoft OLE DB Provider for ODBC Drivers- Fehler '80040e10'
[Microsoft][ODBC Microsoft Access Driver] 1 Parameter wurden erwartet, aber es wurden zu wenig Parameter übergeben.
/gxinternet/cont_topic/31contr.asp, line 26 <-- that's the "set rstEntry = objConn.execute(strSQL)" line.
The code "page1.asp"
Code:
<html>
<head>
</head>
</body>
<form BOTID="0" METHOD="POST" ACTION="page2.asp">
<select name="ctrysel" size="1">
<% @language=javascript %>
<%
var conn=Server.CreateObject("ADODB.Connection");
var rs=Server.CreateObject("ADODB.Recordset");
conn.open("WP011C0203");
rs=conn.execute("SELECT * FROM tbl_country ORDER BY CountryName ASC");
while (!rs.EOF)
{
Response.write("<option>"+rs("CountryName")+"</option>");
rs.MoveNext();
}
rs.close();
conn.close();
%>
</select>
<input TYPE="image" src="../images/button/submit.gif" value="Submit" name="submit">
<!--webbot bot="SaveAsASP" clientside suggestedext="asp" preview=" " -->
</form>
</body>
</html>
The code "page2.asp"
Code:
<%
'Variables dimensioning
Dim objConn
Dim strSQL
Dim rstEntry
Dim strOfficeType
Dim strCity
Dim strCountryISO
Dim strCompany
Dim strAddress1
Dim strAddress2
Dim strZIP
Dim strPhone
Dim strFax
Dim strEmail
Dim strMMG
'DB connect
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DSN=WP011C0203"
objConn.open
'Create Recordset
strSQL ="SELECT * FROM qyr_mmg WHERE CountryName =" & Request.Form("ctrysel")
set rstEntry = objConn.execute(strSQL)
'Fill in variables
strOfficeType = rstEntry("OfficeType").value
strCountryISO = rstEntry("CountryISO").value
strCompany = rstEntry("Company").value
strAddress1 = rstEntry("Address1").value
strAddress2 = rstEntry("Address2").value
strZIP =rstEntry("ZIP").value
strCity = rstEntry("City").value
strPhone = rstEntry("Phone").value
strFax = rstEntry("Fax").value
strEmail = rstEntry("Email").value
strMMG = rstEntry("MMG").value
%>
<html>
<head>
</head>
<body>
The following goods are sourced from <% Response.Write Request.Form("ctrysel")%>
<ul><li> <%=strMMG%> </li></ul>
For further details to become a supplier please contact our
<%=strOfficeType%> in <%=strCity%> who is responisble for the
selected Country of Origin <% Response.Write Request.Form("ctrysel")%>.
<%=strCompany%>
<%=strAddress1%>
<%=strAddress2%>
<%=strZIP%> <%=strCity%>
<%=strPhone%>
<%=strFax%>
<%=strEmail%>
</body>
</html>
- - - - - - - - - - - - - - - - - - - - - - - - -
Can't find the bug. Thanks in advance for you help.
Dani
(BTW, i'am nearly an ASP Beginner. Sorry,...)