all groups > coldfusion flash integration > february 2006 >
You're in the

coldfusion flash integration

group:

CFGrid Not Populatin


CFGrid Not Populatin hhr_jb
2/17/2006 11:33:00 PM
coldfusion flash integration:
Can someone please help. I'm creating a flash form and trying to query mysql
database and displaying the data inside of the data grid. I get all the column
names, but the data is not populating. Here's my code.

<Cfformgroup type="horizontal">
<cfquery name="Lookup" datasource="Tracker">
Select * from Advertising where Month="01" and Year="2006"
</cfquery>
<CFgrid name="Jan" Query="Lookup">
<CFgridcolumn name="Site" Header="Site">
<CFgridcolumn name="Month" Header="Month">
<CFgridcolumn name="Day" Header="Day">
</CFgrid>
</cfformgroup>

Thanks

Re: CFGrid Not Populatin doug777
2/18/2006 12:00:00 AM
Your cf looks right. I suggest you add <cfdump var="#Lookup#"><cfabort>
after your </cfquery> tag and see if your query is returning the data
you expect.

Doug


[quoted text, click to view]
Re: CFGrid Not Populatin hhr_jb
2/20/2006 10:35:47 PM
Thanks Doug777, but it did not work. I still do not get any data in the grid. Any Other Suggestions.

Re: CFGrid Not Populatin doug777
2/21/2006 12:00:00 AM
The only difference I can see between your code and code I've used is
that I always do all my database interaction stuff before calling
cfform. So the only other suggestion I have if the data returned by the
query is correct, is to move the query so that it comes before cfform. I
don't know why that should make a difference, but it's worth a try.

Another possibility is that some variable you're using is a reserved
word. It wouldn't be a bad idea to change the database column names to
something like AdSite AdDay AdMonth otherwise you tend to get different
tables with same column names which is bad practice and can cause errors.

Other than that you could post the cfdump.

Re: CFGrid Not Populatin hhr_jb
2/21/2006 7:29:06 PM
Ok, I got it to work now. I'd just moved the query outside of the form declaration and bam, all the data poulated.

Thanks
AddThis Social Bookmark Button