Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: problem with Disconnected Recordset


Message #1 by "krisd" <keywordmedia@h...> on Thu, 14 Dec 2000 11:42:44 -0000
i have followed the code in ADO RDS wrox book

creating a disconnected recordset by saving data into C:\data.dat



when i tried to create another file to add a new record into it, it din't

work



can anyone please fix this problem please?



please see code of 2 files below..

<%''THIS FILE CALLED testCreate.asp ,it works well%>

<%On Error Resume Next 

Set objRS = Server.CreateObject("ADODB.Recordset") 

objRS.CursorType = 3 

objRS.CursorLocation = 3



objRS.Open "C:\data.dat"



If err.number = 3709 Then

err.number = 0 

objRS.Fields.Append "FName", 200, 25 

objRS.Open

End If



for i = 65 to 70 

objRS.AddNew

objRS("FName") = CHR(i) 

objRS.Update 

next 



objRS.Save "C:\data.dat"



If err.number = 58 Then 

objRS.Save 

End If



objRS.Close

Set objRS = Nothing 

%>



========================================

<%''THIS FILE CALLED testAdd.asp IT DOESNT WORK..... 

Set objRS = Server.CreateObject("ADODB.Recordset") 

objRS.CursorLocation = 3



objRS.Open "C:\data.dat" 

objRS.addnew

objRS("Fname")="G" 

objRS.Update 



objRS.Close 

Set objRS = Nothing 

%>



--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index