[ASP]Database Result Error (2)

Pagina: 1
Acties:

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Ik had laatst een database gecreeerd met submit form enal. Alleen ik krijg die data in de database niet tevoorschijn. Kreeg steeds deze melding:

Database Results Error
The database connection named 'personeel' is undefined.

This problem can occur if:
* the connection has been removed from the web
* the file 'global.asa' is missing or contains errors
* the root folder does not have Scripting permissions enabled
* the web is not marked as an Application Root

Deze 4 dingen slaan eigenlijk nergens op.
1. Ik heb die site met frontpage gemaakt en had die hele map gekopieerd had nix aan die conncetion veranderd in de site
2. ik zie duidelijk een global.asa in de de map waar index.html staat ( ook gemaakt door Frontpage zelf)
3. Ik heb Full Acces tot alles van die map dus daar kan het ook niet aan liggen
4. Ik heb bij Services in IIS opgegeven dat die site Default Page

Maar alsnog wil mijn site niet werken. Wat kan er nog verder fout is gegaan. Ik hoop dat jullie me hierbij kan helpen.

  • whoami
  • Registratie: December 2000
  • Laatst online: 09:26
Een nieuw topic openen na een slotje doe je niet.
Mail D2k, leg hem uit wat je al allemaal geprobeerd hebt, en vraag of hij je topic heropent.

https://fgheysels.github.io/


  • D2k
  • Registratie: Januari 2001
  • Laatst online: 09-01 11:25

D2k

heropend
heb je een goede connectionstring?

Doet iets met Cloud (MS/IBM)


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Heb je een DSN genaamd personeel aangemaakt?

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • Capa
  • Registratie: November 2002
  • Laatst online: 26-08 09:34
Frontpage Server Extensions 2002 erop????

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Heb je een DSN genaamd personeel aangemaakt?
Ik heb een database die genaamd personeel heet
Sauron-XP schreef op 19 december 2002 @ 15:59:
Frontpage Server Extensions 2002 erop????
Op de server of binnen het site???

[ Voor 24% gewijzigd door Du0 op 19-12-2002 16:32 ]


  • Capa
  • Registratie: November 2002
  • Laatst online: 26-08 09:34
op de server

[ Voor 85% gewijzigd door Capa op 19-12-2002 16:48 ]


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
heb net die ding geinstalleerd op de server maar alsnog lukt het niet -_-
maar alsnog bedankt _/-\o_

[ Voor 17% gewijzigd door Du0 op 19-12-2002 17:18 ]


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Mogen we je Connectionstring eens zien?
En DSN != Database.

[ Voor 22% gewijzigd door gorgi_19 op 19-12-2002 17:29 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
de bron van mijn .asp????

  • robjanssen
  • Registratie: September 2001
  • Laatst online: 02-08 16:10

robjanssen

Software Developer

Ja, post ff de code met je ConnectionString erin, dan kunnen we je verder helpen.

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Dat is die submission_form.asp

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
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body background="mmcab.gif" bgproperties="fixed">

<table width="100%" align=left>
  <tr>
    <td width="50%">
      <font size="+3" color="#000080"><b>Nieuwe personeel toevoegen</b></font></td>
    <td width="50%" align=right>
      <table width="445" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
        <tr>
          <td width="398">
        | <a href="results_page.asp">Personeels Info</a> | 
        Nieuwe personeel toevoegen
 | <a href="editor/database_editor.asp">Database Editor</a> 

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Naam.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Naam\" field.");
    theForm.Naam.focus();
    return (false);
  }

  if (theForm.Telefoon.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Telefoon\" field.");
    theForm.Telefoon.focus();
    return (false);
  }

  if (theForm.Mobiel.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Mobiel\" field.");
    theForm.Mobiel.focus();
    return (false);
  }

  if (theForm.Email.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }
  return (true);
}
//--></script><form METHOD="POST" action="submission_form.asp" webbot-action="--WEBBOT-SELF--">

<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">

<p><b>Naam</b><br>
&nbsp;<input type="TEXT" name="Naam" size="64" value="" maxlength="255"><br>
</p>
<p><b>Geboortedatum</b><br>
&nbsp;<input type="TEXT" name="Geboortedatum" size="19" value="31-10-2002"><br>
</p>
<p><b>Adres</b><br>
&nbsp;<textarea rows="10" name="Adres" cols="64"></textarea><br>
</p>
<p><b>Telefoon</b><br>
&nbsp;<input type="TEXT" name="Telefoon" size="64" value="" maxlength="255"><br>
</p>
<p><b>Mobiel</b><br>
&nbsp;<input type="TEXT" name="Mobiel" size="64" value="" maxlength="255"><br>
</p>
<p><b>Email</b><br>
&nbsp;<input type="TEXT" name="Email" size="64" value="" maxlength="255"><br>
</p>


<p><input type="submit" value="    OK    "><input type="reset" value=" Reset "></p>

</form>

</body>

</html>

[ Voor 58% gewijzigd door Du0 op 23-12-2002 12:25 ]


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Dat is Result.asp

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
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- View</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF" background="mmcab.gif">

<table width="101%" align=left>
  <tr>
    <td width="40%">
      <font size="+3" color="#000080"><b>Personeels Info</b></font><b><font size=+3 color="#000080"> </font></b>
    </td>
    <td width="60%" align=right>
      <table bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
        <tr>
<td bgcolor="#FFFFFF">
        | Personeels Info
| <a href="submission_form.asp">Nieuwe Personeel toevoegen</a>
| <a href="editor/database_editor.asp">Database Editor</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<table width="100%" border="1" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
  <thead>
    <tr>
      <td><b>Key</b></td>
      <td><b>Naam</b></td>
      <td><b>Geboortedatum</b></td>
      <td><b>Adres</b></td>
      <td><b>Telefoon</b></td>
      <td><b>Mobiel</b></td>
      <td><b>Email</b></td>

   </tr>
  </thead>

  <tbody>

  <tr><td colspan=7 color=#000000 bgcolor=#ffff00><tt><b>Database Results Error</b><br>The database connection named 'personeel' is undefined.<br><br>This problem can occur if:<br>* the connection has been removed from the web<br>* the file 'global.asa' is missing or contains errors<br>* the root folder does not have Scripting permissions enabled<br>* the web is not marked as an Application Root<br></tt></td></tr>
  </tbody>

</table>


</body>

</html>

[ Voor 31% gewijzigd door Du0 op 23-12-2002 12:20 ]


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

In dit geval submission_form.asp, wat we graag zouden zien.

En zou je [code][/code] tags willen gebruiken? Vergroot de leesbaarheid voor ons enorm.

En in result.asp
code:
1
<a href="submission_form.asp">Nieuwe Personeel toevoegen</a>


Moet denk ik
code:
1
<a href="submission.asp">Nieuwe Personeel toevoegen</a>


zijn

[ Voor 38% gewijzigd door gorgi_19 op 23-12-2002 12:05 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
die submission form heet echt submission_form.asp en niet submission.asp

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Du0 schreef op 23 december 2002 @ 12:19:
die submission form heet echt submission_form.asp en niet submission.asp
Wat is dit dan??

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
mijn fout
sorry

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Voor de zekerheid ook de global.asa

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
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
    '==FrontPage Generated - startspan==
    Dim FrontPage_UrlVars(1)
    '--Project Data Connection
        Application("personeel_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/personeel.mdb"
        FrontPage_UrlVars(0) = "personeel_ConnectionString"
        Application("personeel_ConnectionTimeout") = 15
        Application("personeel_CommandTimeout") = 30
        Application("personeel_CursorLocation") = 3
        Application("personeel_RuntimeUserName") = ""
        Application("personeel_RuntimePassword") = ""
    '--
    Application("FrontPage_UrlVars") = FrontPage_UrlVars
    '==FrontPage Generated - endspan==
End Sub
Sub Session_OnStart
    FrontPage_StartSession '==FrontPage Generated==
End Sub
Sub FrontPage_StartSession
    On Error Resume Next
    if Len(Application("FrontPage_VRoot")) > 0 then Exit Sub
    
    sFile = "global.asa"
    sRootPath = Request.ServerVariables("APPL_PHYSICAL_PATH")
    if Left(sRootPath,1) = "/" then sSep = "/" else sSep = "\"
    if Right(sRootPath,1) <> sSep then sRootPath = sRootPath & sSep
    sRootPath = sRootPath & sFile
    
    ' discover the VRoot for the current page;
    ' walk back up VPath until we match VRoot
    Vroot = Request.ServerVariables("PATH_INFO")
    iCount = 0
    do while Len(Vroot) > 1
        idx = InStrRev(Vroot, "/")
        if idx > 0 then
            Vroot = Left(Vroot,idx)
        else
            ' error; assume root web
            Vroot = "/"
        end if
        if Server.MapPath(Vroot & sFile) = sRootPath then exit do
        if Right(Vroot,1) = "/" then Vroot = Left(Vroot,Len(Vroot)-1)
        iCount = iCount + 1
        if iCount > 100 then
            ' error; assume root web
            Vroot = "/"
            exit do
        end if
    loop
    ' map all URL= attributes in _ConnectionString variables
    Application.Lock
    if Len(Application("FrontPage_VRoot")) = 0 then
        Application("FrontPage_VRoot") = Vroot
        UrlVarArray = Application("FrontPage_UrlVars")
        for i = 0 to UBound(UrlVarArray)
            if Len(UrlVarArray(i)) > 0 then FrontPage_MapUrl(UrlVarArray(i))
        next
    end if
    Application.Unlock
End Sub
Sub FrontPage_MapUrl(AppVarName)
    ' convert URL attribute in conn string to absolute file location
    strVal = Application(AppVarName)
    strKey = "URL="
    idxStart = InStr(strVal, strKey)
    If idxStart = 0 Then Exit Sub
    strBefore = Left(strVal, idxStart - 1)
    idxStart = idxStart + Len(strKey)
    idxEnd = InStr(idxStart, strVal, ";")
    If idxEnd = 0 Then
        strAfter = ""
        strURL = Mid(strVal, idxStart)
    Else
        strAfter = ";" & Mid(strVal, idxEnd + 1)
        strURL = Mid(strVal, idxStart, idxEnd - idxStart)
    End If
    strOut = strBefore & Server.MapPath(Application("FrontPage_VRoot") & strURL) & strAfter
    Application(AppVarName) = strOut
End Sub
</SCRIPT>
<head><title>Web Settings for Active Server Pages</title><html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:connectionstatus msdt:dt="string">personeel=1</mso:connectionstatus>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
ontbreekt er nog steeds info die jullie met dit probleem kan helpen?!??!?!

Verwijderd

zou graag inhoud van de asp files zien (dus van af je hdd) en niet de 'html' stuff..

dus ff de file openen met een editor, en niet via een url bron opvragen en dan hier paste (wat dus gewoon html is).

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
???????
welke bestand bedoel je?!??!?!
bovenstaande 3 bestanden is de enige bestanden die met de extentie .asa en .asp

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Ik ben nog wel benieuwd naar de reactie op
[rml]gorgi_19 in "[ ASP]Database Result Error (2)"[/rml]

Aangezien je een database hebt die personeel heet, maar dit hoeft niet in te houden dat je een DSN hebt (welke je nodig hebt!) die personeel heet.

[ Voor 5% gewijzigd door gorgi_19 op 06-01-2003 10:26 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


Verwijderd

Du0, ze hebben als extentie asp, maar dat dit zijn de asp files niet (asa is wel goed).
Deze paginas heb jij eerst uitgevoed en toen de source geript. Waardoor je alleen de door asp bewerte html krijgt en niet de asp source code.

zo nog een keer:
JE MOET NIET VANAF http://localhost/submission_form.asp EN http://localhost/result.asp RECHTER MUIS KNOP DOEN EN DAN BRON WEERGEVEN MAAR JE MOET NAAR JE C:\INETPUB\WWWROOT\ GAAN EN DAAR DE FILES VANDAAN HALEN EN OPENEN MET KLATBLOK OFZO EN DAN DE SOURCE KOPIEREN EN HIER PLAKKEN!!!!!

ok nog een keer extra voor jouw: http://localhost en c:\inetpub\wwwroot\ zijn dan de default settings.. ik weet niet wat voor namen je daarvoor gebruikt.

Maar ga ff aub nadenken met je bolle harsis.
<tr><td colspan=7 color=#000000 bgcolor=#ffff00><tt><b>Database Results Error</b><br>The database connection named 'personeel' is undefined.<br><br>This problem can occur if:<br>* the connection has been removed from the web<br>* the file 'global.asa' is missing or contains errors<br>* the root folder does not have Scripting permissions enabled<br>* the web is not marked as an Application Root<br></tt></td></tr>
wil je zeggen dat je dat zelf in de asp file gescript had *GG*.

n000b :P

sorry voor flame ... maar als je ASP aan het leren ben (schat dat dit zijn eerste dag is) vind dan eerst ff uit hoe alles werkt, zoals IIS en hoe ASP zelf werkt.

Verwijderd

Waarom maak je asp pagina's met frontpage ? Ik maak asp pagina's eerst in
kladblok want dan blijft er overzicht. Daarna kan je altijd nog met frontpage
de layout bewerken.

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Verwijderd schreef op 06 januari 2003 @ 11:18:
Waarom maak je asp pagina's met frontpage ? Ik maak asp pagina's eerst in
kladblok want dan blijft er overzicht. Daarna kan je altijd nog met frontpage
de layout bewerken.
Frontpage kan zelf ook enige vorm van asp-code genereren, waardoor wysiwyg mogelijk blijft, ook met db connecties. In dit geval wordt FP niet alleen als layout-editor gebruikt.

* gorgi_19 blijft trouwens het vermoeden houden dat de oorzaak ligt in:
ASP:
1
Application("personeel_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/personeel.mdb"

[ Voor 32% gewijzigd door gorgi_19 op 06-01-2003 11:23 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


Verwijderd

gorgi_19 schreef op 06 January 2003 @ 11:20:
[...]

Frontpage kan zelf ook enige vorm van asp-code genereren, waardoor wysiwyg mogelijk blijft, ook met db connecties. In dit geval wordt FP niet alleen als layout-editor gebruikt.
Dat zal best wel, maar die code die gegenereerd wordt vind ik een beetje
omslachtig. Dat kan allemaal veel korter.

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 09:26

gorgi_19

Kruimeltjes zijn weer op :9

Verwijderd schreef op 06 januari 2003 @ 11:27:
[...]


Dat zal best wel, maar die code die gegenereerd wordt vind ik een beetje
omslachtig. Dat kan allemaal veel korter.
Helemaal mee eens, imho moet je FP hier ook niet voor gebruiken, maar we gaan nu wel een beetje ot. :)

Topicstarter heeft een probleem met deze connection; eens kijken wat hij / zij te zeggen heeft op de suggesties.

[ Voor 15% gewijzigd door gorgi_19 op 06-01-2003 11:29 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


Verwijderd

Gewoon HomeSite gebruiken dus :)
(en het liefst de Alaire (HomeSite 4.52) versie en niet die van Macro Media (HomeSite 5)

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
Dit zijn de source die ik met kladblok heb geopend.

Global.asa

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
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
    '==FrontPage Generated - startspan==
    Dim FrontPage_UrlVars(1)
    '--Project Data Connection
        Application("personeel_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/personeel.mdb"
        FrontPage_UrlVars(0) = "personeel_ConnectionString"
        Application("personeel_ConnectionTimeout") = 15
        Application("personeel_CommandTimeout") = 30
        Application("personeel_CursorLocation") = 3
        Application("personeel_RuntimeUserName") = ""
        Application("personeel_RuntimePassword") = ""
    '--
    Application("FrontPage_UrlVars") = FrontPage_UrlVars
    '==FrontPage Generated - endspan==
End Sub
Sub Session_OnStart
    FrontPage_StartSession '==FrontPage Generated==
End Sub
Sub FrontPage_StartSession
    On Error Resume Next
    if Len(Application("FrontPage_VRoot")) > 0 then Exit Sub
    
    sFile = "global.asa"
    sRootPath = Request.ServerVariables("APPL_PHYSICAL_PATH")
    if Left(sRootPath,1) = "/" then sSep = "/" else sSep = "\"
    if Right(sRootPath,1) <> sSep then sRootPath = sRootPath & sSep
    sRootPath = sRootPath & sFile
    
    ' discover the VRoot for the current page;
    ' walk back up VPath until we match VRoot
    Vroot = Request.ServerVariables("PATH_INFO")
    iCount = 0
    do while Len(Vroot) > 1
        idx = InStrRev(Vroot, "/")
        if idx > 0 then
            Vroot = Left(Vroot,idx)
        else
            ' error; assume root web
            Vroot = "/"
        end if
        if Server.MapPath(Vroot & sFile) = sRootPath then exit do
        if Right(Vroot,1) = "/" then Vroot = Left(Vroot,Len(Vroot)-1)
        iCount = iCount + 1
        if iCount > 100 then
            ' error; assume root web
            Vroot = "/"
            exit do
        end if
    loop
    ' map all URL= attributes in _ConnectionString variables
    Application.Lock
    if Len(Application("FrontPage_VRoot")) = 0 then
        Application("FrontPage_VRoot") = Vroot
        UrlVarArray = Application("FrontPage_UrlVars")
        for i = 0 to UBound(UrlVarArray)
            if Len(UrlVarArray(i)) > 0 then FrontPage_MapUrl(UrlVarArray(i))
        next
    end if
    Application.Unlock
End Sub
Sub FrontPage_MapUrl(AppVarName)
    ' convert URL attribute in conn string to absolute file location
    strVal = Application(AppVarName)
    strKey = "URL="
    idxStart = InStr(strVal, strKey)
    If idxStart = 0 Then Exit Sub
    strBefore = Left(strVal, idxStart - 1)
    idxStart = idxStart + Len(strKey)
    idxEnd = InStr(idxStart, strVal, ";")
    If idxEnd = 0 Then
        strAfter = ""
        strURL = Mid(strVal, idxStart)
    Else
        strAfter = ";" & Mid(strVal, idxEnd + 1)
        strURL = Mid(strVal, idxStart, idxEnd - idxStart)
    End If
    strOut = strBefore & Server.MapPath(Application("FrontPage_VRoot") & strURL) & strAfter
    Application(AppVarName) = strOut
End Sub
</SCRIPT>
<head><title>Web Settings for Active Server Pages</title></head>


Result_page.asp
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
117
<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- View</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">

<table width="100%" align=left>
  <tr>
    <td width="50%">
      <b><font size=+3 color="#000080"> Results Page </font></b>
    </td>
    <td width="50%" align=right>
      <table>
        <tr>
          <td>
        Results Page
| <a href="submission_form.asp" target="_top">Submission Form</a>
| <a href="editor/database_editor.asp" target="_top">Database Editor</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Key</b></td>
      <td><b>Naam</b></td>
      <td><b>Geboortedatum</b></td>
      <td><b>Adres</b></td>
      <td><b>Telefoon</b></td>
      <td><b>Mobiel</b></td>
      <td><b>Email</b></td>

   </tr>
  </thead>

  <tbody>

  <!--webbot bot="DatabaseRegionStart" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-columntypes="3,202,135,203,3,3,202" s-dataconnection="personeel" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Results" s-displaycolumns="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-criteria s-order s-sql="SELECT * FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="5" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="TBODY" startspan preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Results"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=7 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="personeel"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=7
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan -->

  <tr>

    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Key" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Key&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Key")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Naam" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Naam&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Naam")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Geboortedatum" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Geboortedatum&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Geboortedatum")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Adres" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Adres&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Adres")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Telefoon" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Telefoon&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Telefoon")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Mobiel" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Mobiel&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Mobiel")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="Key,Naam,Geboortedatum,Adres,Telefoon,Mobiel,Email" s-column="Email" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Email&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Email")%><!--webbot bot="DatabaseResultColumn" endspan -->
    </td>


  </tr>
  <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" startspan preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot;  |&lt;  &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;   &lt;  &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;  &gt;   &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;  &gt;|  &quot;&gt;  [1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan -->
  </tbody>

</table>


</body>

</html>


submission_form.asp
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
    Err.Clear

    Set fp_conn =  Server.CreateObject("ADODB.Connection")
    FP_DumpError strErrorUrl, "Cannot create connection"

    Set fp_rs = Server.CreateObject("ADODB.Recordset")
    FP_DumpError strErrorUrl, "Cannot create record set"

    fp_conn.Open Application("personeel_ConnectionString")
    FP_DumpError strErrorUrl, "Cannot open database"

    fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
    FP_DumpError strErrorUrl, "Cannot open record set"

    fp_rs.AddNew
    FP_DumpError strErrorUrl, "Cannot add new record set to the database"
    Dim arFormFields0(6)
    Dim arFormDBFields0(6)
    Dim arFormValues0(6)

    arFormFields0(0) = "Naam"
    arFormDBFields0(0) = "Naam"
    arFormValues0(0) = Request("Naam")
    arFormFields0(1) = "Geboortedatum"
    arFormDBFields0(1) = "Geboortedatum"
    arFormValues0(1) = Request("Geboortedatum")
    arFormFields0(2) = "Adres"
    arFormDBFields0(2) = "Adres"
    arFormValues0(2) = Request("Adres")
    arFormFields0(3) = "Telefoon"
    arFormDBFields0(3) = "Telefoon"
    arFormValues0(3) = Request("Telefoon")
    arFormFields0(4) = "Mobiel"
    arFormDBFields0(4) = "Mobiel"
    arFormValues0(4) = Request("Mobiel")
    arFormFields0(5) = "Email"
    arFormDBFields0(5) = "Email"
    arFormValues0(5) = Request("Email")

    FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


    fp_rs.Update
    FP_DumpError strErrorUrl, "Cannot update the database"

    fp_rs.Close
    fp_conn.Close

    FP_FormConfirmationFromArrays "text/html; charset=windows-1252",_
                        "Form Confirmation",_
                        "Thank you for submitting the following information:",_
                        "submission_form.asp",_
                        "Return to the form.",_
                        arFormDBFields0,_
                        arFormValues0

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<% Response.Buffer = True %>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">

<table width="100%" align=left>
  <tr>
    <td width="50%">
      <b><font size=+3 color="#000080"> Submission Form </font></b>
    </td>
    <td width="50%" align=right>
      <table>
        <tr>
          <td>
        <a href="results_page.asp" target="_top">Results Page</a> | 
Submission Form
 | <a href="editor/database_editor.asp" target="_top">Database Editor</a> 

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Naam.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Naam\" field.");
    theForm.Naam.focus();
    return (false);
  }

  if (theForm.Telefoon.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"Telefoon\" field.");
    theForm.Telefoon.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.Telefoon.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Telefoon\" field.");
    theForm.Telefoon.focus();
    return (false);
  }

  if (theForm.Mobiel.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"Mobiel\" field.");
    theForm.Mobiel.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.Mobiel.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Mobiel\" field.");
    theForm.Mobiel.focus();
    return (false);
  }

  if (theForm.Email.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form METHOD="POST" action="submission_form.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--">

<!--webbot bot="SaveDatabase" suggestedext="asp" s-dataconnection="personeel" s-recordsource="Results" s-form-fields="Naam Geboortedatum Adres Telefoon Mobiel Email" s-form-dbfields="Naam Geboortedatum Adres Telefoon Mobiel Email " b-usedbfieldsforconfirmation="True" u-asp-include-url="../../_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="43152" -->

<p><b>Naam</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Naam" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Naam" size="64" value="" maxlength="255"><br>
</p>
<p><b>Geboortedatum</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Geboortedatum" s-data-type="String" b-value-required="False" i-maximum-length="0" --><input type="TEXT" name="Geboortedatum" size="19" value="<%=Date%>"><br>
</p>
<p><b>Adres</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Adres" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="10" name="Adres" cols="64"></textarea><br>
</p>
<p><b>Telefoon</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Telefoon" s-data-type="Integer" b-value-required="False" i-maximum-length="10" --><input type="TEXT" name="Telefoon" size="10" value="0" maxlength="10"><br>
</p>
<p><b>Mobiel</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Mobiel" s-data-type="Integer" b-value-required="False" i-maximum-length="10" --><input type="TEXT" name="Mobiel" size="10" value="0" maxlength="10"><br>
</p>
<p><b>Email</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Email" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Email" size="64" value="" maxlength="255"><br>
</p>


<p><input type="submit" value="    OK    "><input type="reset" value=" Reset "></p>

</form>

</body>

</html>

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
BTW op een test server was me wel een keertje gelukt om de site aan praat te krijgen. Daarna lukt het niet meer.

  • whoami
  • Registratie: December 2000
  • Laatst online: 09:26
Tja, als je veranderd van server moet je natuurlijk ook wel je connectiestring veranderen:
juiste servernaam
geldige username/pwd...

https://fgheysels.github.io/


  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
neeee
ik heb hem helemaal opnieuw gemaakt
dus niet zomaar gekopieerd ( ZOOO noob ben ik nou weer niet )

Verwijderd

Heb je het al met een ODBC geprobeerd ?

  • Du0
  • Registratie: September 2002
  • Laatst online: 19-04-2022
ja
ik heb bij ODBC al naar mijn site verwezen
en bij IIS heb ik als default page gedaan

  • sig69
  • Registratie: Mei 2002
  • Nu online
ik gebruik zowieso *nooit* ODBC of DSN
probeer dit eens om aan je DB te hangen (als je acces db gebruikt dan):
ASP:
1
2
3
4
5
6
7
8
9
10
11
'Database verbinding
strDataConn = ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/db/programmas.mdb"))
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open strDataConn

'Database bewerkingen, query's ed

'Database verbinding sluiten
Set RS = nothing
Conn.close
Set Conn = nothing  

[ Voor 9% gewijzigd door sig69 op 06-01-2003 15:40 . Reden: Syntax foutje... ]

Roomba E5 te koop

Pagina: 1