Okay, I've figured it out. It seems I left out some information
from my original post that might of helped.
The problem was in my aspx code that generated the xml for the
HTTPService. I needed to make sure not to cache there. I'm showing
my whole aspx code for others in case they run up with this
problem. I love it when it takes two days to write four lines of
code.
Thanks Tracy for your original post, it got me thinking in the right
direction.
****************Code .net aspx****************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim strSQL As String
Dim strUser As String
Dim strWhere As String
Dim Conn As New SqlConnection
("Server=MyServer;Database=MyDB;UID=UserID;PWD=")
'+++here is where I stop the caching+++++++
Response.Buffer = True
Response.ExpiresAbsolute = DateAdd(DateInterval.Day, -1,
Today.Now)
Response.Expires = 0
Response.CacheControl = "no-cache"
'+++++++++End of new cache code+++++++
Response.ClearContent()
Response.ContentType = "text/xml"
If Not Request.QueryString("File") = "" Then
strWhere = "FileNameID = " & Request.QueryString("File")
End If
If Not Request.QueryString("Search") = "" Then
strWhere = "Tag Like '%" & Request.QueryString("Search")
& "%'"
End If
strSQL = "SELECT * FROM tblTableName WHERE " & strWhere
Conn.Open()
Dim myCmd2 As SqlCommand = New SqlCommand(strSQL, Conn)
Dim myReader2 As SqlDataReader = myCmd2.ExecuteReader()
Dim w As XmlTextWriter = New XmlTextWriter
(Response.OutputStream, Encoding.UTF8)
w.Formatting = Formatting.Indented
w.WriteStartDocument()
If Request.QueryString("File") Then
w.WriteStartElement("FileID")
w.WriteAttributeString("FileID", Request.QueryString
("File"))
While myReader2.Read
w.WriteStartElement("Tag")
w.WriteString(myReader2.Item("Tag"))
w.WriteEndElement()
End While
Else
w.WriteStartElement("Tag")
w.WriteAttributeString("Tag", Request.QueryString
("Search"))
While myReader2.Read
w.WriteStartElement("FileName")
w.WriteString(myReader2.Item("FileNameID"))
w.WriteEndElement()
End While
End If
w.WriteEndElement()
w.Close()
End Sub
****************end of code**********************
--- In [email protected], "meathead" <[EMAIL PROTECTED]> wrote:
>
> I don't think the problem is binding to lastResult. The code
> works. When I use my third tier to capture the data and insert it
> into my SQL table, it works like a charm. When I return to the
main
> page, the data isn't there. If I close the application and start
it
> again, the data shows. I'm pretty sure this is a cache issue.
I'm
> using a url built on the fly. I'm just a little confused on how
> HTTPService handles multiple .send(); calls. Is there a way to
> clear the HTTPService cache or am I not understanding and
something
> else needs to be done?
>
> Thanks for the reply,
> Aaron
> --- In [email protected], "Tracy Spratt" <tspratt@>
> wrote:
> >
> > I advise not binding directly to lastResult for this very
reason:
> it is
> > difficult to debug.
> >
> >
> >
> > Instead, use a result handler function. In that you can trace or
> > otherwise examine the data you get back. If it is the same,
then
> you
> > have the cache issue.
> >
> >
> >
> > I have been told that POST calls do not cache, but GET does.
> > HTTPService defaults to GET, and uses GET if the post body is
> empty.
> >
> >
> >
> > Another common solution to cache issues is to append some unique
> string
> > to the url.
> >
> >
> >
> > Tracy
> >
> >
> >
> > ________________________________
> >
> > From: [email protected]
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of meathead
> > Sent: Monday, January 29, 2007 4:42 PM
> > To: [email protected]
> > Subject: [flexcoders] HTTPService not updating tilelist
> itemrenderer
> >
> >
> >
> > Hi all,
> >
> > I've searched and searched and I can't figure this out.
> >
> > I've got a HTTPService to call XML from a SQL Server database
and
> > populate a TileList with LinkButtons using an itemrenderer. This
> > works peachy keen. I am also able to click a button and add an
> > entry to my database. This also works very swell. However, I can
> > not get the TileList to update with the new entry when I close
my
> > TitleWindow from which I send my new entry to the database from.
> > I'm trying to figure out if the HTTPService is cacheing somehow
or
> > if itemrenderer needs to be refreshed, or if it's something
> > completely different. I'm pretty sure it's the HTTPService
> because,
> > when I add the new database item by hand the HTTPService is not
> > refreshing when recalling the send. I've tried closing the
Service
> > and disconnecting but to no avail. Basically, it's not updating.
> > Here is some code.....
> >
> > ******LinkButton component named "TagLink"********8
> > <mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml
> > <http://www.adobe.com/2006/mxml> "
> > label="{data.Tag}" height="25" width="90" color="blue" >
> > </mx:LinkButton>
> >
> > ********HTTPService************
> > <mx:HTTPService id="rstTag"
> > url="http://sycorax/KDA/XMLPhotoTags.aspx?File=1
> > <http://sycorax/KDA/XMLPhotoTags.aspx?File=1> "
useProxy="false"/>
> >
> > ********and subsequent call when user clicks a list*********
> > rstTag.url = "http://Some/LocalServer/XMLpage.aspx?File=
> > <http://Some/LocalServer/XMLpage.aspx?File=> " +
> > rlstThumbs.selectedItem.FileID.toString();
> > rstTag.send();
> >
> > ********TileWindow and TileList*****
> > <mx:TitleWindow width="25%" height="29" layout="absolute"
> > id="twinTags" title="Tags" alpha=".25" left="0" top="0"
> > click="TagListClick();">
> > <mx:TileList id="tlstTags" itemRenderer="TagLink"
change="SendTags
> > ();" dataProvider="{rstTag.lastResult.FileID.Tag}">
> > </mx:TileList>
> > </mx:TitleWindow>
> >
> > Thanks in advance.
> > Aaron
> >
>