Toon posts:

[asp] script met foutmelding

Pagina: 1
Acties:
  • 80 views sinds 30-01-2008

Verwijderd

Topicstarter
hey,
ik heb een stuk asp dat ervoor zorgt dat mijn query over meerdere pagina's versprijdt wordt.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!-- #INCLUDE FILE="adovbs.inc" --> 
<html> 
<head> 
<meta http-equiv="Content-Language" content="nl"> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 
<title>TopicLijst </title> 
</head> 

<body bgcolor="#FFFFFF"> 
<center> 

<% 


Set Conn = Server.CreateObject("ADODB.Connection")
db  = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
          "Data Source=" & Server.MapPath("\remco292\db\kiona.mdb") & ";" & _
          "Persist Security Info=False"
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & db & ";"   




'Get the Current page 
pg = TRIM(Request( "pg" )) 
IF pg = "" then pg = 1 

Set RS = Server.CreateObject( "ADODB.RecordSet" ) 
RS.CursorType = adOpenStatic 
RS.ActiveConnection = Con 
RS.PageSize = 8 
RS.Open = "SELECT * FROM gastenboek ORDER BY Datum DESC" 
RS.AbsolutePage = pg 
%> 

<center> 
<p align="left"><i><b><font face="Saved By Zero" size="7" color="#FFB0B0">&nbsp;</font></b></i><b><font color="#77BBFF" size="5">&nbsp;</font><font color="#0000FF" size="5">Prikbordberichtjes </font></b><i><b> 
<font face="Saved By Zero" size="5" color="#FFB0B0">&nbsp; </font></b></i> 
     <font face="Verdana" color="#FF0000" size="1"><b> 
     <span style="background-color: #FFFFFF">hoofdpagina - prikbord</span></b></font><i><b><font face="Saved By Zero" size="5" color="#FFB0B0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
J</font></b></i><font face="Saved By Zero" size="5" color="#DCDCDC">ob</font><b><i><font face="Saved By Zero" size="5" color="#FFB0B0">I</font></i></b><font face="Saved By Zero" size="5" color="#DCDCDC">ntermediair...</font></p> 

<table width="90%" border="0" cellpadding="0" cellspacing="0"> 
<tr> 
    <td width="20%" style="font-family:Arial Narrow; color:#000080"> 
    <p align="right"> 
    <font size="2"><b><a href="AddTopic.asp"><font color="#008080"> 
    <span style="background-color: #FFFFFF">Nieuw bericht toevoegen</span></font></a></b></font></td> 
</tr> 
</table> 

<table width="90%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Tahoma; font-size: 8 pt; letter-spacing: 1pt" bordercolor="#111111" width="100%"> 
<tr><td width="65%"><font size="1" face="MS Sans Serif">&nbsp; Onderwerp</font></td> 
   <td width="25%"><font size="1" face="MS Sans Serif">Starter</a></font></td> 
   <td width="10%"><font size="1" face="MS Sans Serif">Reacties</a></font></td> 
</tr> 
</table> 
<table width="90%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Tahoma; font-size: 8 pt; letter-spacing: 1pt" bordercolor="#111111" width="100%"> 
<tr><td width="100%" style="font-family: Tahoma; font-size: 8 pt; color: #0000FF"> 
  <hr color="#000080"></td> 
</tr> 
</table> 
<% 
WHILE NOT RS.EOF AND rowCount < RS.PageSize 
rowCount = rowCount + 1 
%> 
<table width="90%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Tahoma; font-size: 8 pt; letter-spacing: 1pt" bordercolor="#111111" width="100%"> 
<tr><td width="65%" style="font-family: Tahoma; font-size: 8 pt; color: #0000FF"><%=RS("Datum")%></b></a></td> 
   <td width="25%" style="font-family: Tahoma; font-size: 8 pt; color: #0000FF"><%=RS("Tijd")%>&nbsp;</td> 
   <td width="10%" style="font-family: Tahoma; font-size: 8 pt; color: #0000FF"><%=RS("Bericht")%>&nbsp;</td> 
</tr> 
</table> 
<% 
RS.MoveNext 
WEND 

IF RS.PageCount > 1 THEN 
%> 
<font color="darkblue"> 
<b>Ga naar pagina: </b> 
<% 
   FOR i = 1 to RS.PageCount 
   IF i <> cINT( pg ) THEN 
%> 
<a href="TopicLijst.asp?pg=<%=i%>"><font color="blue"><%=i%></font></a> 
<% ELSE %> 
<b><%=i%></b> 
<% END IF 
NEXT 
%> 
</font> 

<% 
END IF 

'Alles sluiten 
RS.Close 
Set RS = Nothing 
Con.Close 
Set Con = Nothing 
%> 

<p align="center"><a href="mailto:wcorbier@home.nl"><font color="#000000">Mail 
de sitemaster</font></a></p> 
<table> 
  <tr> 
    <td width="336" bgcolor="#FFFF80"> 
    <p align="center"><font size="1" color="#800000" face="Tahoma">De sitemaster houdt het 
    recht zonder opgaaf van reden een bericht te weigeren of te verwijderen</font></td> 
  </tr> 
</div> 
</center> 
</table> 
</font> 
</body> 
</html>

De foutmelding is

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name too long

/remco292/test2.asp, line 18

kan iemand me helpen?!

  • Juup
  • Registratie: Februari 2000
  • Niet online
Op vrijdag 24 mei 2002 23:34 pastte Remco292 een lap code:
...
Data Source=" & Server.MapPath("\remco292\db\kiona.mdb") & ";" & _ "Persist Security Info=False"
...
Het zal wel aan deze regel liggen. Nou weet ik nix van asp maar print/echo/write die Server.MapPath("\remco292\db\kiona.mdb") eens even naar je scherm en kijk hoe lang die is. Waarschijnlijk langer dan 255 chars.

Een wappie is iemand die gevallen is voor de (jarenlange) Russische desinformatiecampagnes.
Wantrouwen en confirmation bias doen de rest.


  • Annie
  • Registratie: Juni 1999
  • Laatst online: 25-11-2021

Annie

amateur megalomaan

deja vu? >:)

Today's subliminal thought is:


  • whoami
  • Registratie: December 2000
  • Laatst online: 07-09 19:30
Ik denk dat de DSN te lang is.

https://fgheysels.github.io/


  • dusty
  • Registratie: Mei 2000
  • Laatst online: 21-02 00:06

dusty

Celebrate Life!

Who Am I?

Remco292: Cursusje Engels nodig?

Back In Black!
"Je moet haar alleen aan de ketting leggen" - MueR


Dit topic is gesloten.