Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/visa_artiklar.asp, line 24
<%
Function WordLeft(strText, intNoOfWords)
Dim arrText, strippedText, I
arrText = Split(strText, " ")
If UBound(arrText) => intNoOfWords Then
For I = 0 To (intNoOfWords - 1)
If i = (intNoOfWords - 1) Then
strippedText = strippedText & arrText(i) & "..."
Else
strippedText = strippedText & arrText(i) & " "
End if
Next
Else
strippedText = strText
End If
WordLeft = strippedText
End Function
%>
<% Set Connect = Server.CreateObject("ADODB.connection")
Connect.open = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/artiklar.mdb")
VISA = "SELECT TOP 6 * FROM artiklar ORDER by datum DESC "
Set RecSet = Connect.execute(VISA)
%>
<%
strRubrik = "=RecSet(rubrik)"
%>
<% do until RecSet.EOF %>
<a href="las_artikel.asp?id=<%=RecSet("id")%>">
<%Response.Write WordLeft(strRubrik, 10)%>
</a><BR>
<% RecSet.MoveNext
loop
RecSet.close
Connect.close
Set RecSet = nothing
Set Connect = nothing %>
Connect.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/artiklar.mdb")
VISA = "SELECT TOP 6 * FROM artiklar ORDER by datum DESC "
Du hade ett = direkt efter connect.open.
255 ms totalt · 4 externa anrop · v20260731065814-full.86ec41c2