<%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connections/kalender.asp" --> <% session.LCID = 1030 %> <% Dim bruger__MMColParam bruger__MMColParam = "1" if (Request.Cookies("brugernavn") <> "") then bruger__MMColParam = Request.Cookies("brugernavn") %> <% set bruger = Server.CreateObject("ADODB.Recordset") bruger.ActiveConnection = MM_kalender_STRING bruger.Source = "SELECT * FROM bruger WHERE brugernavn = '" + Replace(bruger__MMColParam, "'", "''") + "'" bruger.CursorType = 0 bruger.CursorLocation = 2 bruger.LockType = 3 bruger.Open() bruger_numRows = 0 %> <% Dim rs_arrangement__MMColParam rs_arrangement__MMColParam = "1" if (Request.QueryString("date") <> "") then rs_arrangement__MMColParam = Request.QueryString("date") %> <% set rs_arrangement = Server.CreateObject("ADODB.Recordset") rs_arrangement.ActiveConnection = MM_kalender_STRING rs_arrangement.Source = "SELECT * FROM kalender WHERE dato = '" + Replace(rs_arrangement__MMColParam, "'", "''") + "'" rs_arrangement.CursorType = 0 rs_arrangement.CursorLocation = 2 rs_arrangement.LockType = 3 rs_arrangement.Open() rs_arrangement_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rs_arrangement_numRows = rs_arrangement_numRows + Repeat1__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next
' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next
' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
Hvis du dog har en gammel database driver skal access dog have #havelåger#, men hvis man har en nyere db driver er det ikke nødvendigt med # men helt fint med '
der skal i hvertfald ikke begge ting på (# og ') :) lav om til rs_arrangement.Source = "SELECT * FROM kalender WHERE dato = '" + Replace(rs_arrangement__MMColParam, "'", "''") + "'"
a1 yeps, det er sådan den ser ud! rs_arrangement.Source = "SELECT * FROM kalender WHERE dato = '" + Replace(rs_arrangement__MMColParam, "'", "''") + "'"
men stadigt fejl i linie 31 som er: rs_arrangement.Open()
jeg er i ultradev og den isger data mitch match uanset om jeg skriver rs_arrangement__MMColParam = "NULL" eller rs_arrangement__MMColParam = "01/02/2002" eller rs_arrangement__MMColParam = "01-01-2002"
:) http://www.dbmsmag.com/9707d06.html Standard ANSI/ISO SQL-92 has a full specification for dates and times that are based on ISO-8601 standards and should have no Year 2000 problems. This standard requires the "yyyy-mm-dd" format and 24-hour time formats based on the UTC (Universal Coordinated Time, formerly the GMT or Greenwich Mean Time) and has a lot of details in it.
du behøver ikke at læse hele hans "tossede" forklaring... bare.. Standard ANSI/ISO SQL-92 has a full specification for dates and times that are based on ISO-8601 standards and should have no Year 2000 problems. This standard requires the "yyyy-mm-dd" format and 24-hour time formats based on the UTC (Universal Coordinated Time, formerly the GMT or Greenwich Mean Time) and has a lot of details in it
datoformat skal være "yyyy-mm-dd" iflg. Standard ANSI/ISO SQL-92
:)
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.