Hoi ik heb een website gemaakt met asp voor onze scouting groep.
Nu had ik deze thuis op mijn win2000 draaien onder IIS en alles werkte perfect!
Nu hebben wij een hosting van ASP op een Cobalt Server en met MYSQL. Na heel
wat aanpassingen werkt bijna alles nu weer (CaseSensitive enz enz.) Ik heb alleen nog 1 probleem: Ik had in 2 tabbellen binaire bestanden staan. (foto's word docs etc.) deze laadde ik m.b.v. de webpagina in een access db. Nu met Mysql word dat wat moeilijk mijn script werkt niet meer
Nu heb ik 3 vragen:
- Als file type van een database veld in access ole object is, wat word het dan in MYSCQL? ik dacht BLOB of TinyBlob maar het script werkt dan nog niet
- Ik heb op internet gezocht naar Sites waar ik source codes van scripts kan downloaden voot MYSQL Specifiek. maar zonder resultaat, heeft iemand hier voor goede links?
- Het stukje script heb ik aangepast, maar loopt hier steeds vast herkent iemand het???
Ik heb een script uploaden.asp wat goed werkt, dit script maakt gebruik van uploaden_functies.asp hierin gaat het fout. uploaden_functies.asp ziet er zo uit:
De error melding is:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
uploaden_functies.asp, line 22
Public Property Get Form(sIndex)
----------------^
Ik hoop dat iemand mij kan helpen!
Alvast bedankt!
Nu had ik deze thuis op mijn win2000 draaien onder IIS en alles werkte perfect!
Nu hebben wij een hosting van ASP op een Cobalt Server en met MYSQL. Na heel
wat aanpassingen werkt bijna alles nu weer (CaseSensitive enz enz.) Ik heb alleen nog 1 probleem: Ik had in 2 tabbellen binaire bestanden staan. (foto's word docs etc.) deze laadde ik m.b.v. de webpagina in een access db. Nu met Mysql word dat wat moeilijk mijn script werkt niet meer
Nu heb ik 3 vragen:
- Als file type van een database veld in access ole object is, wat word het dan in MYSCQL? ik dacht BLOB of TinyBlob maar het script werkt dan nog niet
- Ik heb op internet gezocht naar Sites waar ik source codes van scripts kan downloaden voot MYSQL Specifiek. maar zonder resultaat, heeft iemand hier voor goede links?
- Het stukje script heb ik aangepast, maar loopt hier steeds vast herkent iemand het???
Ik heb een script uploaden.asp wat goed werkt, dit script maakt gebruik van uploaden_functies.asp hierin gaat het fout. uploaden_functies.asp ziet er zo uit:
ASP:
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
| <% Class FileUploader Public Files Private mcolFormElem Private Sub Class_Initialize() Set Files = Server.CreateObject("Scripting.Dictionary") Set mcolFormElem = Server.CreateObject("Scripting.Dictionary") End Sub Private Sub Class_Terminate() If IsObject(Files) Then Files.RemoveAll() Set Files = Nothing End If If IsObject(mcolFormElem) Then mcolFormElem.RemoveAll() Set mcolFormElem = Nothing End If End Sub 'HIER GAAT HET FOUT: Public Property Get Form(sIndex) Form = "" If mcolFormElem.Exists(LCase(sIndex)) Then Form = mcolFormElem.Item(LCase(sIndex)) End Property Public Default Sub Upload() Dim biData, sInputName Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos Dim nPosFile, nPosBound biData = Request.BinaryRead(Request.TotalBytes) nPosBegin = 1 nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13))) If (nPosEnd-nPosBegin) <= 0 Then Exit Sub vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin) nDataBoundPos = InstrB(1, biData, vDataBounds) Do Until nDataBoundPos = InstrB(biData, vDataBounds & CByteString("--")) nPos = InstrB(nDataBoundPos, biData, CByteString("Content-Disposition")) nPos = InstrB(nPos, biData, CByteString("name=")) nPosBegin = nPos + 6 nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34))) sInputName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) nPosFile = InstrB(nDataBoundPos, biData, CByteString("filename=")) nPosBound = InstrB(nPosEnd, biData, vDataBounds) If nPosFile <> 0 And nPosFile < nPosBound Then Dim oUploadFile, sFileName Set oUploadFile = New UploadedFile nPosBegin = nPosFile + 10 nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34))) sFileName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) oUploadFile.FileName = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\")) nPos = InstrB(nPosEnd, biData, CByteString("Content-Type:")) nPosBegin = nPos + 14 nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13))) oUploadFile.ContentType = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) nPosBegin = nPosEnd+4 nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2 oUploadFile.FileData = MidB(biData, nPosBegin, nPosEnd-nPosBegin) If oUploadFile.FileSize > 0 Then Files.Add LCase(sInputName), oUploadFile Else nPos = InstrB(nPos, biData, CByteString(Chr(13))) nPosBegin = nPos + 4 nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2 If Not mcolFormElem.Exists(LCase(sInputName)) Then mcolFormElem.Add LCase(sInputName), CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) End If nDataBoundPos = InstrB(nDataBoundPos + LenB(vDataBounds), biData, vDataBounds) Loop End Sub 'String to byte string conversion Private Function CByteString(sString) Dim nIndex For nIndex = 1 to Len(sString) CByteString = CByteString & ChrB(AscB(Mid(sString,nIndex,1))) Next End Function 'Byte string to string conversion Private Function CWideString(bsString) Dim nIndex CWideString ="" For nIndex = 1 to LenB(bsString) CWideString = CWideString & Chr(AscB(MidB(bsString,nIndex,1))) Next End Function End Class Class UploadedFile Public ContentType Public FileName Public FileData Public Property Get FileSize() FileSize = LenB(FileData) End Property Public Sub SaveToDatabase(ByRef oField) If LenB(FileData) = 0 Then Exit Sub If IsObject(oField) Then oField.AppendChunk FileData End If End Sub End Class %> |
De error melding is:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
uploaden_functies.asp, line 22
Public Property Get Form(sIndex)
----------------^
Ik hoop dat iemand mij kan helpen!
Alvast bedankt!
[ Voor 3% gewijzigd door Verwijderd op 03-02-2003 08:19 ]