[thelist] ASP: object read only?
Tab Alleman
Tab.Alleman at MetroGuide.com
Fri Jul 11 15:40:04 CDT 2003
Casey Crookston wrote:
> Second, I'm aware that this is the clumsy way to go about this
> process and I would much rather just update the record from the SQL
> statement, but I'm not sure of the VBScript syntax. Any suggestions?
> The query would look like this: "UPDATE texts SET block = '"&block&"'
> WHERE text_id="&text_id" but again it's the VBScript that I'm unsure
> of.
This should do it:
>
> <!-- #INCLUDE FILE="../adovbs.inc" -->
> <%
> Dim Connect, rcrdSet, Query, text_id, text
>
> text_id = request("text_id")
>
> block = request("block")
>
> Set Connect = Server.CreateObject("ADODB.Connection")
>
> Connect.Open "boser_db"
>
> Set rcrdSet = Server.CreateObject("ADODB.RecordSet")
>
> Query = "UPDATE texts SET block='" & block & "' WHERE text_id=" &
text_id
Connect.Execute Query
>
> Connect.Close
>
> %>
More information about the thelist
mailing list