access update problem

Results 1 to 2 of 2

Thread: access update problem

  1. #1
    Join Date
    Dec 1969

    Default access update problem

    why the following code is nto working....i get syntax error for update.The line numbers are for ref<BR>My ainm is to enter the login time of the user in the field "loginTime"(I use ms-access)<BR><BR>&#060;%@ language = vbscript %&#062;<BR>&#060;% option explicit %&#062;<BR>1 &#060;!--#include virtual ="" --&#062;<BR>2 &#060;%<BR>3 dim emp,pwd<BR>4 emp = Request("t1") &#039;form field t1 holds login name<BR>5 pwd = Request("t2") &#039;t2 holds password<BR><BR>6 dim objconn<BR>7 set objconn = Server.CreateObject("ADODB.Connection")<BR>8 objconn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_<BR> "DBQ=f:Inetpubwwwrootloginfo.mdb"<BR>9 objconn.Open<BR> <BR>10 dim objrs<BR>11 set objrs = Server.CreateObject("ADODB.Recordset")<BR>12 objrs.Open "loginf",objconn,,adLockOptimistic,adCmdTable< BR> <BR> <BR>13 Do While Not objrs.EOF<BR>14 If objrs("loginID") = emp And objrs("pw") = pwd Then<BR>15 Session("logs") = objrs("name")<BR>16 objrs("loginTime") = Now()<BR>17 objrs.Update<BR>18 Response.Redirect "aftlog.asp"<BR>19 objrs.Close<BR>20 set objrs = Nothing<BR>21 objconn.Close<BR>22 set objconn = Nothing<BR>23 Else<BR>24 objrs.MoveNext<BR>25 End If<BR>26 Loop<BR>27 If objrs.EOF Then<BR>28 objrs.Close<BR>29set objrs = Nothing<BR>30 objconn.Close<BR>31 set objconn = Nothing <BR>32 Response.Redirect "login.asp"<BR>33 End If<BR>34%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default VERY good

    another post<BR><BR><BR>an extra line<BR><BR><BR><BR>but still jack f...g **** <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts