Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: update db problem


Message #1 by "Keyvan Janghorbani" <iranwap@y...> on Wed, 23 Oct 2002 15:52:09
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:
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 Wed, 23 Oct 2002 10:32:55 -0700
Keyvan,

First, this is NOT all of the code.  What does the
ConnectionString look like?  Secondly, we don't know WHAT the
error is!  Can you copy/paste it into an email?

Thanks.

Larry Woods


> -----Original Message-----
> From: Keyvan Janghorbani [mailto:iranwap@y...]
> Sent: Wednesday, October 23, 2002 3:52 PM
> To: Access ASP
> Subject: [access_asp] update db problem
>
>
> 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:
> 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 #3 by "Todd Schuman" <Todd_schuman@h...> on Thu, 24 Oct 2002 14:37:12
I have having a similar problem.  Why would code work in Win 2000 but not 
on a web server?

> 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:
o> bjRS.Open "Friends", objConn,adopenstatic,adlockoptimistic

> THE WHOLE CODE IS:
D> im 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 #4 by "Ken Schaefer" <ken@a...> on Fri, 25 Oct 2002 11:26:27 +1000
Todd,

Can you *please* post the code that you are using?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Todd Schuman" <Todd_schuman@h...>
Subject: [access_asp] Re: update db problem


: I have having a similar problem.  Why would code work in Win 2000 but not
: on a web server?
:
: > 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:
: o> bjRS.Open "Friends", objConn,adopenstatic,adlockoptimistic
:
: > THE WHOLE CODE IS:
: D> im 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