Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_ado_rds thread: Re: File already exists when objRs.Save


Message #1 by "Branimir Giurov" <branimir@n...> on Tue, 22 May 2001 14:42:09
i haven't much time lately, so I tryed your code today.

then i spent a little time reading MSDN.

And there was this pretty cool explanation, that sais that you shoul use 

client-side recordset. try it out. it works.

> I'm getting:

> 

> Error Type:

> Microsoft VBScript runtime (0x800A003A)

> File already exists

> /vcccd/1_SampleCode/vccccd/rsOpen.asp, line 9

> 

> from this code (essentially right out of wrox ADO 2.6)

> 

> <%

> Set objConn = Server.CreateObject("ADODB.Connection")

> Set objRs = Server.CreateObject("ADODB.Recordset")

> objConn.Open "dsn=pubs;uid=sa;pwd=;"

> strSQL = "SELECT * FROM employee"

> objRs.Open strSQL,objConn,adOpenDynamic,adLockOptimistic

> objRs.Save "c:\MyData3.dat",adPersistXML

> objRs.Close

> Set objRs.ActiveConnection=nothing

> objConn.Close

> 

> 'lets use this offline

> objRs.Open "c:\MyData3.dat"

>    While Not objRs.EOF

>    

> 	Response.Write objRs("emp_id") & objRs("lname") & "<br>"

>      objRs.MoveNext

>    Wend

> 

> objRs.Close

> %>

> 

> 

> What would be the best method to update the local file? Updating the 

> server is not a factor in this case.

> 

> Thanks

> 

> Vince


  Return to Index