Ø
Øyvind Henriksen
Is there a way to do this in ASP.Net (without writing strings
with UPDATE/INSERT SQL statements) ?
--
SQL = "SELECT * FROM Login_IP WHERE IP='" & IP & "' AND Username='" &
lcase(usr) & "';"
Set RS = Server.CreateObject ("ADODB.RecordSet")
RS.ActiveConnection = Hovedbase
RS.CursorType = 1
RS.LockType = 2
RS.source = SQL
RS.Open
If RS.EOF Then
RS.AddNew()
RS("IP") = IP
RS("Username") = lcase(usr)
End IF
RS("Dato") = Date()
RS.Update()
RS.Close
Set RS = Nothing
--
TIA,
Øyvind Henriksen
Systems engineer
Tlf: +47 982 51 014
Fax: +47 45 50 97 05
___________________________________
InCreo Interactive Creations AS
Po box 1241, Pirsenteret, 7462 Trondheim
Service nr: +47 815 51 888 Fax: +47 455 09 679
Org.nr.: NO 982 057 892 www.increo.no
with UPDATE/INSERT SQL statements) ?
--
SQL = "SELECT * FROM Login_IP WHERE IP='" & IP & "' AND Username='" &
lcase(usr) & "';"
Set RS = Server.CreateObject ("ADODB.RecordSet")
RS.ActiveConnection = Hovedbase
RS.CursorType = 1
RS.LockType = 2
RS.source = SQL
RS.Open
If RS.EOF Then
RS.AddNew()
RS("IP") = IP
RS("Username") = lcase(usr)
End IF
RS("Dato") = Date()
RS.Update()
RS.Close
Set RS = Nothing
--
TIA,
Øyvind Henriksen
Systems engineer
Tlf: +47 982 51 014
Fax: +47 45 50 97 05
___________________________________
InCreo Interactive Creations AS
Po box 1241, Pirsenteret, 7462 Trondheim
Service nr: +47 815 51 888 Fax: +47 455 09 679
Org.nr.: NO 982 057 892 www.increo.no