<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1013918" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1013918</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080605</link>
    <description> &lt;p&gt;ewww yuck. I didn&#039;t even notice the access part.  (I guess I just didn&#039;t want to see that &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;)&lt;/p&gt;
&lt;p&gt;akohl, I&#039;m no expert &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;.  I even forgot to turn the page while looking up the rs.open....&lt;/p&gt;
&lt;p&gt;LockType:&lt;br /&gt;
&lt;del&gt;adLockReadOnly&lt;/del&gt; = 1 = Records are read-only and cannot be changed.&lt;br /&gt;
&lt;del&gt;adLockPessimistic&lt;/del&gt; = 2 = Records are locked when you start editing them.&lt;br /&gt;
&lt;del&gt;adLockOptimistic&lt;/del&gt; = 3 = Records are locked when you call the Update method to commit your changes.&lt;br /&gt;
&lt;del&gt;adLockatchOptimistic&lt;/del&gt; = 4 = Required if you are performing batch updates to a set of records.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 17:45:31 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1080605 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080599</link>
    <description> &lt;p&gt;When you are working with an Access db backend, things can get pretty strange. Sometimes it throws you error descriptions that have nothing to do with the actual error that is happenning. Maybe you had accidently locked that table without knowing it (a crashed asp page can do that), and it didn&#039;t unlock until it timed out.&lt;/p&gt;
&lt;p&gt;I can&#039;t offer you any pills (besides aspirin &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; ) but I will suggest you move to a better backend (Microsoft SQL Server or MySQL) as soon as possible, it will save you a lot of headaches, plus with a real DBMS you can use stored procedures. Once you start using stored procs you&#039;ll never go back to doing the SQL in the ASP page.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 13:59:09 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1080599 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>really Puzzleing!</title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080598</link>
    <description> &lt;p&gt;What you guys are saying is really strange to me since, on the one hand, you are the experts (and what you are saying is in the visual interdev documentation) and I am just a newbie. And yet, something is missing here because what you are saying just doesn&#039;t seem to be happening. &lt;/p&gt;
&lt;p&gt;The problem I had has been solved. How? No idea. I just redid everything and got it to work. I have no idea where the mistake was. Maybe I tried to delete or change a primary key? Would that have given me the error messages I was getting? &lt;/p&gt;
&lt;p&gt;Below is the code that works.&lt;/p&gt;
&lt;p&gt;It deletes records from recordset objects of ms access db file, and changes them. I guess that means that the changes are being saved to the db file.&lt;/p&gt;
&lt;p&gt;Every record set is opened with a 3 cursor setting. &lt;/p&gt;
&lt;p&gt;It works! So what is does it mean that the 3 is a &quot;read only&quot; cursor setting?&lt;/p&gt;
&lt;p&gt;By the way; Do you guys know of a pill that I could take to make working with database files and asp easier, and less painfull?&lt;/p&gt;
&lt;p&gt;------&lt;br /&gt;
	case request.Form(&quot;sub_deletepurchases&quot;)&amp;lt;&amp;gt;&quot;&quot;&lt;br /&gt;
		requested_purchase=request.Form(&quot;text101&quot;)&lt;br /&gt;
		requested_book=request.Form(&quot;text107&quot;)&lt;br /&gt;
		requested_user=request.Form(&quot;text105&quot;)&lt;br /&gt;
		&#039;when we delete a purchase listing we must refund the cost*quantity&lt;br /&gt;
		&#039;to the account associated with the user associated with the purchase&lt;br /&gt;
		&#039;listing. we must also return to stock of book table the number of books&lt;br /&gt;
		&#039;where purchase was cancelled&lt;br /&gt;
		&#039;rs1 has all purchase fields except purchase_id, which is autonumber/primary key&lt;br /&gt;
		sqlstr=&quot;SELECT Purchases.date, Purchases.book_id, Purchases.quantity, Purchases.user_id FROM Purchases WHERE (((Purchases.purchase_id)=&quot;&amp;amp;requested_purchase&amp;amp;&quot;));&quot;&lt;br /&gt;
		rs1.Open sqlstr,con,3,3&lt;br /&gt;
		&#039;rs2 has price of book and quantity&lt;br /&gt;
		sqlstr=&quot;SELECT Books.price, Purchases.quantity FROM Books INNER JOIN Purchases ON Books.book_id = Purchases.book_id WHERE (((Books.book_id)=&quot;&amp;amp;requested_book&amp;amp;&quot;));&quot;&lt;br /&gt;
		rs2.Open sqlstr,con,3,3&lt;br /&gt;
		&#039;rs3 has one field, the customer who cancelled a puerchase account balance&lt;br /&gt;
		sqlstr=&quot;SELECT Accounts.balance FROM Accounts WHERE (((Accounts.user_id)=&quot;&amp;amp;requested_user&amp;amp;&quot;));&quot;&lt;br /&gt;
		rs3.Open sqlstr,con,3,3&lt;/p&gt;
&lt;p&gt;		&#039;rs4 has one field, stock of book where purchase was deleted&lt;/p&gt;
&lt;p&gt; 		sqlstr=&quot;SELECT Books.stock FROM Books WHERE (((Books.book_id)=&quot;&amp;amp;requested_book&amp;amp;&quot;));&quot;&lt;br /&gt;
 		rs4.Open sqlstr,con,3,3 &lt;/p&gt;
&lt;p&gt; 		Response.write(&quot;balance is &quot;&amp;amp;rs3.Fields(0)&amp;amp;&quot;&quot;)&lt;br /&gt;
		Response.write(&quot;quantity is &quot;&amp;amp;rs2.Fields(1)&amp;amp;&quot;&quot;)&lt;/p&gt;
&lt;p&gt;		&#039;here we update account in light of deleted purchase&lt;br /&gt;
		rs3.fields(0)=cint(rs3.fields(0))+cint(rs2.Fields(0)*rs2.Fields(1))&lt;br /&gt;
		rs3.update&lt;br /&gt;
		rs3.MoveFirst &lt;/p&gt;
&lt;p&gt;		Response.write(&quot;new balance is &quot;&amp;amp;rs3.Fields(0)&amp;amp;&quot;&quot;)&lt;br /&gt;
		Response.write(&quot;stock is &quot;&amp;amp;rs4.Fields(0)&amp;amp;&quot;&quot;)&lt;/p&gt;
&lt;p&gt;		&#039;here we update stock in light of cancelled purchase&lt;br /&gt;
		rs4.Fields(0)=cint(rs4.Fields(0))+cint(rs2.Fields(1))&lt;br /&gt;
		rs4.update&lt;br /&gt;
		rs4.MoveFirst&lt;br /&gt;
		Response.write(&quot;updated stock is &quot;&amp;amp;rs4.Fields(0)&amp;amp;&quot;&quot;)&lt;br /&gt;
		&#039;here we actually delete the data in the chosen purchase listing&lt;br /&gt;
		rs1.delete&lt;br /&gt;
		rs1.MoveFirst 	&lt;/p&gt;
&lt;p&gt;		rs1.Close&lt;br /&gt;
		set rs1=nothing&lt;br /&gt;
		rs2.Close&lt;br /&gt;
		set rs2=nothing&lt;br /&gt;
		rs3.Close&lt;br /&gt;
		set rs3=nothing&lt;br /&gt;
		rs4.Close&lt;br /&gt;
		set rs4=nothing&lt;br /&gt;
		Response.Write (&quot;that purchase was wiped out dhhuuudde. go check if details from puechase no. &quot;&amp;amp;requested_purchase&amp;amp;&quot; are gone&quot;)&lt;br /&gt;
------------&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 13:46:08 +0000</pubDate>
 <dc:creator>akohl</dc:creator>
 <guid isPermaLink="false">comment 1080598 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080594</link>
    <description> &lt;p&gt;Mark was right about the cursor, it should be 2 and the locktype should be fine at 3. Have you saved anything to this database yet? It almost sounds like wherever it is located there is no &quot;write&quot; permissions set, only read. To save into an Access db the folder must have write permissions. If that&#039;s not it make sure you didn&#039;t save it as read-only.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 12:42:31 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1080594 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I don&#039;t undestand</title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080583</link>
    <description> &lt;p&gt;you wrote;&lt;/p&gt;
&lt;p&gt;&amp;gt;rs.Open sqlstr, con,3,3 = rs.Open slstr, con, &amp;gt;adOpenStatic, adOpenStatic &lt;/p&gt;
&lt;p&gt;first of all, the second 3 is for lock type and not cursor type, isn&#039;t it?&lt;/p&gt;
&lt;p&gt;Second of all, the change you suggest didn&#039;t help.&lt;/p&gt;
&lt;p&gt;&amp;gt;you want:&lt;br /&gt;
&amp;gt;rs.Open sqlstr, con,2 = rs.Open slstr, con, adOpenKeyset &lt;/p&gt;
&lt;p&gt;By the way, you didn&#039;t mean to leave off the lock type value, did you?  I tried it like this;&lt;/p&gt;
&lt;p&gt;rs.Open sqlstr, con,2,3  &lt;/p&gt;
&lt;p&gt;and like this;&lt;/p&gt;
&lt;p&gt;rs.Open sqlstr, con,2&lt;/p&gt;
&lt;p&gt;The first gives me, &quot;database or object is read only&quot;&lt;/p&gt;
&lt;p&gt;the second gives me, &quot;The operation requested by the application is not supported by the provider&quot;&lt;/p&gt;
&lt;p&gt;Besides I have been using rs.open sqlstr,3,3 for adding, updating and deleteing fields in the very same application, in fact, on the very same asp page, and it has been working fine, until now. &lt;/p&gt;
&lt;p&gt;This one has really got me! I&#039;m totally stuck here!&lt;/p&gt;
&lt;p&gt;Please keep on trying to help me out until we get to the bottom of this!&lt;/p&gt;
&lt;p&gt;Thanks in advance for your efforts.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 10:10:10 +0000</pubDate>
 <dc:creator>akohl</dc:creator>
 <guid isPermaLink="false">comment 1080583 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/read-only-database#comment-1080565</link>
    <description> &lt;p&gt;rs.Open sqlstr, con,3,3 = rs.Open slstr, con, adOpenStatic, adOpenStatic&lt;/p&gt;
&lt;p&gt;you want:&lt;br /&gt;
&lt;strong&gt;rs.Open sqlstr, con,2&lt;/strong&gt; = rs.Open slstr, con, adOpenKeyset&lt;/p&gt;
&lt;p&gt;&lt;del&gt;adOpenForwardOnly&lt;/del&gt; = 0 = Creates a read-only recordset that can only scroll forward&lt;br /&gt;
&lt;del&gt;adOpenKeySet&lt;/del&gt; = 1 = Curor enables you to add, modify, and delete records, but you won&#039;t see changes maade by other users while your recordset is open.&lt;br /&gt;
&lt;del&gt;adOpenDynamic&lt;/del&gt; = 2 = Cursor enables you to add, modify, and delete records, and you will see any changes made by other users.&lt;br /&gt;
&lt;del&gt;adOpenStatic&lt;/del&gt; = 3 = Creates a read-only reacordset that has all capabilities for positioning; that is forward and backward, as well as bookmarking.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Apr 2001 06:14:53 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1080565 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
