Hej
Får følgende fejl, når jeg kører mit scritp.
ADODB.Recordset.1 (0x80004005)
SQLState: 4 Native Error Code: 1064 [TCX][MyODBC]You have an
error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '' at
line 1
Kan også ses på
www.thomasknielsen.dk/kalender/calendar.asp
Min asp kode ser sådan her ud..
<%
Set objconn = Server.CreateObject("ADODB.Connection")
objconn.Open
"Driver={MySql};Server=localhost;Database=thomasknielsen_;UID=tho
masknielsen_;PASSWORD=moore1"
For iWeek = 1 To iRows
Response.Write "<TR VALIGN=TOP>"
For iDay = 1 To iColumns
' Checks to see if there is a day this month on the date being
written
If aCalendarDays((iWeek-1)*7 + iDay) > 0 then
dtOnDay = DateSerial(Year(dtCurrentDate),
Month(dtCurrentDate), aCalendarDays((iWeek-1)*7 + iDay))
' Checks to see if the day being printed is today
If dtOnDay = dtToday Then
Response.Write "<TD HEIGHT=55 CLASS='calCurrentDay'>"
Else
Response.Write "<TD HEIGHT=55 CLASS='calOtherDay'>"
End If
' Checks to see the type of calendar (editable or
non-editable)
If (bolEditable) then
strPage = "updateCalendar_form.asp?currentDate=" &
dtOnDay
Else
strPage = "viewDay.asp?currentDate=" & dtOnDay
End If
' Checks for a message on the day being written
strSQL = "SELECT * FROM calendar WHERE calendarDate = #" &
dtOnDay & "#"
response.write strSQL
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF Then
dailyMsg = objRS("calendarText")
Else
dailyMsg = ""
End If
Set objRS = Nothing
' Checks to see if the message is too long to be displayed in
the mini date box
If (Trim(dailyMsg) = Trim(Left(dailyMsg,
intCharToShow))) Then
Else
dailyMsg = Trim(Left(dailyMsg, intCharToShow-4)) & " ..."
End If
Response.Write ("<A HREF=""" & strPage & """> " &
aCalendarDays((iWeek-1)*7 + iDay) & "<BR> " &
FormatStr(dailyMsg) & "</A>")
Else
Response.Write ("<TD HEIGHT=50 CLASS='calNotDay'> ")
End IF
Response.Write "</TD>"
Next
Response.Write "</TR>"
Next
objConn.Close
set objConn = Nothing
%>
Håber en kan hjælpe.. :)
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials