Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: problem with updating records


Message #1 by "Keyvan Janghorbani" <iranwap@y...> on Fri, 25 Oct 2002 16:29:27
I have problem updating my access database
I can update it in my windows2000 but it does not work on my web server
I THINK THE PROBLEM IS WITH THIS LINE:
 Dim objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
       objConn.Open "friendscontactinfo"

objRS.Open "Friends", objConn,adopenstatic,adlockoptimistic

THE WHOLE CODE IS:
Dim objRS
>     Set objRS = Server.CreateObject("ADODB.Recordset")
>     objRS.Open "Friends", objConn,adopenstatic,adlockoptimistic
> objrs.addnew
> objrs("name")="katy"
> objrs("username")="3433"
> objrs("email")="shiraz@s..."
> objrs.update
> objrs.movefirst
> Do While Not objRS.EOF
> Response.Write "<B>" & objRS("Name") & "</B><BR>"
>        Response.Write objRS("username") & "<BR>"
>        Response.Write objRS("email") & ", " & objRS("password")
>            Response.Write objRS("lastname") & "<P><HR><P>"
>        objrs.movenext
> Loop
>      objRS.Close
>     Set objRS = Nothing
> 
>     objConn.Close
>     Set objConn = Nothing
> %>
Message #2 by "Larry Woods" <larry@l...> on Fri, 25 Oct 2002 11:13:53 -0700
What is the error message?????

Larry Woods


> -----Original Message-----
> From: Keyvan Janghorbani [mailto:iranwap@y...]
> Sent: Friday, October 25, 2002 4:29 PM
> To: Access ASP
> Subject: [access_asp] problem with updating records
>
>
> I have problem updating my access database
> I can update it in my windows2000 but it does not work
> on my web server
> I THINK THE PROBLEM IS WITH THIS LINE:
>  Dim objConn
>     Set objConn = Server.CreateObject("ADODB.Connection")
>        objConn.Open "friendscontactinfo"
>
> objRS.Open "Friends", objConn,adopenstatic,adlockoptimistic
>
> THE WHOLE CODE IS:
> Dim objRS
> >     Set objRS = Server.CreateObject("ADODB.Recordset")
> >     objRS.Open "Friends",
> objConn,adopenstatic,adlockoptimistic
> > objrs.addnew
> > objrs("name")="katy"
> > objrs("username")="3433"
> > objrs("email")="shiraz@s..."
> > objrs.update
> > objrs.movefirst
> > Do While Not objRS.EOF
> > Response.Write "<B>" & objRS("Name") & "</B><BR>"
> >        Response.Write objRS("username") & "<BR>"
> >        Response.Write objRS("email") & ", " &
> objRS("password")
> >            Response.Write objRS("lastname") & "<P><HR><P>"
> >        objrs.movenext
> > Loop
> >      objRS.Close
> >     Set objRS = Nothing
> >
> >     objConn.Close
> >     Set objConn = Nothing
> > %>


  Return to Index