|
|
|
|
|
| | |
|
Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: It doesnt work |
From: |
Timo Tuunainen |
Date: |
4/22/1999 4:29:54 AM |
IP: |
195.148.248.241 |
I tried it, but it says:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1.
/msg_view.asp, line 28
The code:
... start of the page is here ...
<%
CID = Request.QueryString("id")
Param = Request.QueryString("Param")
Data = Request.QueryString("Data")
%>
<%
If IsObject(Session("spotweb_conn")) Then
Set conn = Session("spotweb_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "spotweb","",""
Set Session("spotweb_conn") = conn
End If
%>
<%
sql = "SELECT * FROM msgboard WHERE ID = CID"
If cstr(Param) <> "" Then
sql = sql & " And [" & cstr(Param) & "] = " & cstr(Data)
End If
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
%>
... the page itself is here ...
<%
rs.MoveFirst
do while Not rs.eof
%>
<%=Server.HTMLEncode(rs.Fields("ID").Value)%>
<%=Server.HTMLEncode(rs.Fields("Otsikko").Value)%>
<%=Server.HTMLEncode(rs.Fields("Viesti").Value)%>
<%=Server.HTMLEncode(rs.Fields("Pvm").Value)%>
<%=Server.HTMLEncode(rs.Fields("Tag").Value)%>
<%
rs.MoveNext
loop
%>
... rest of the page
And the hyperlink I try is: <A HREF="msg_view.asp?id=6">text</A>
Please help! |
Previous Message
Follow Up - Re: Nevermind, I got it working - Timo Tuunainen 4/22/1999 6:42:12 AM
|
|

|
|
|
|
|
|
|
|
|
|