I can't make neither UPDATE, nor DELETE in DB(MSAccess) using ASP (in other words - any Execute), a simple SELECT only. But if I use VB or VBScript in HTML file - everything is all right. Why?!<br>Thanks.
I think....if you want to modify or delete or add any elements in a database you dont use the RecordSet object.<br>Instead you would use the Connection Object<br><br>Therefor you put<br>DataConn.Execute strEditSQL1<br>where your strEditSQL1 is any SQL add/delete/Update SQL<br><br>
It's exactly what I do:<br>sSQL="insert into MyTable values('aaa','bbb','ccc')"<br>cn.Execute sSQL<br><br>It works without problem in VB or VBScript on the same database and table, but the ASP page doesn't load at all!
I use recordsets when i am trying to retreive a set of records, I use the command object when I want to make some changes to the database(Delete, Update, Insert, etc) <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
Hi there <br><br>you could use rs.update rs.delete commands insted of sql<br>where rs is a ADODB.recordset <br><br>you have but got to singe out the recordset taht you want to update or delete and then use it <br> <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
Front Page 2000 supports database access directly to Microsoft Access and SQL Server 7.<br>But the ISP server has to have Front Page 2000 Extensions on it. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
Try something like this in ASP.<br><br><%<br>Set conn = Server.CreateObject("ADODB.Connection"<br>Conn.Open Session("ConnectionString"<br><br>If Request.QueryString("Delete" Then<br>sql = "DELETE * FROM Members Where Members.PersonID = " & Request.Form("PersonID"<br>Conn.Execute(sql)<br>Response.Redirect "Result.asp?Delete=Success" <br>end if<br>%><br><br>The global.asa contains the Session("ConnectionString".
Thank you very much - all!<br>The problem was in file(mdb) permissions. The ASP page is like "guest" for database, so it hasn't needed permission. Since I've changed it - everything is all right.
Wow, this thread is a perfect example of what can happen when the question does not contain enough or the essential information describing the problem.<br><br>Good job everyone! Oh, that's not what you were going for was it. hehe ;o)<br><br>andry,<br><br>In future ASP posts consider inclucing the IIS error message, if any, that is returned to the browser. The particular problem you were having is well known and has been discussed several times in this forum in the past two weeks. Most of us would have figured it out from the error message in about two or three seconds.<br><br>"But, that's just my opinion... I could be wrong".<br>-pete
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.