asx filesystemobject
argh jeg får den her fejl:Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/stream/opret.asp, line 24, column 72
her er koden:
for i = 1 to 10
If Request.Form("overskrift"&i) = "" Then
Else
overskrift = Request.Form("overskrift"&i)
broedtekst = Request.Form("broedtekst"&i)
dato = Request.Form("dato")
starttid = Request.Form("starttid"&i)
duration = Request.Form("duration"&i)
overskrift = replace(overskrift,"'","''")
broedtekst = replace(broedtekst,"'","''")
nSQL = "INSERT INTO news (headline, story) VALUES ('" & overskrift & "','" & broedtekst & "')"
Conn.Execute(nSQL)
sSQL = "INSERT INTO stream (dato, start, duration) VALUES ('" & dato & "','" & starttid & "','" & duration & "')"
Conn.Execute(sSQL)
Set FileSystemFile = CreateObject("Scripting.FileSystemObject")
FileSystemFile.CreateTextFile "C:\Inetpub\db\stream\" & dato & "\test"&i".asx" <-- linie 24
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set Filesystem = CreateObject("Scripting.FileSystemObject")
Set FilesystemFileContext = Filesystem.OpenTextFile("C:\Inetpub\db\stream\" & dato & "\test"&i".asx", 8, true)
FilesystemFileContext.WriteLine ("<ASX VERSION='3.0' PREVIEWMODE='NO' >")
FilesystemFileContext.WriteLine ("<ENTRY>")
FilesystemFileContext.WriteLine ("<TITLE>Example Clip</TITLE>")
FilesystemFileContext.WriteLine ("<REF HREF = 'mms://129.142.131.36/rejsegalleriet/fantacy/") & dato & ("/250.wmv' />")
FilesystemFileContext.WriteLine ("<STARTTIME VALUE='") & starttid & ("' />")
FilesystemFileContext.WriteLine ("<DURATION VALUE='") & duration & ("' />")
FilesystemFileContext.WriteLine ("<ENTRY>")
FilesystemFileContext.WriteLine ("</ASX>")
FilesystemFileContext.Close
Set FilesystemFileContext = Nothing
Set FileSystemFile = Nothing
End If
next
det er vist her den går galt... \test"&i".asx
