• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Datagrid from a recordset?

LEGEND ,
Jul 23, 2010 Jul 23, 2010

Copy link to clipboard

Copied

Hello,

Everything I have seen shows how to connect a Datagrid to a database table. Thats fine and good. But is it possible to add a datagrid to a recordset somehow?

Brad Lawryk

Adobe Community Professional: Dreamweaver

Northern British Columbia Adobe Usergroup: Manager

My Adobe Blog: http://blog.lawryk.com

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

If you are referring to the recordsets available on the server side, then there are 2 ways to accomplish this.

1. You could convert that to XML and access it on the client in Flex (Its heavy but works smoothly as Flex has tools to access XML data using the Data Wizards or through E4X)

2. Depending on your backend, if it's say ASP.NET then you could use tools like FluorineFx or WebOrb to send recordset data using AMF (which is a binary protocol and lightweight)

The following links should help

http://sujitreddyg.wordpress.com/flash-builder-4/#dotnet

http://www.google.co.in/search?hl=en&q=FlexAMF.NET&aq=f&aqi=&aql=&oq=&gs_rfai=

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

Thanks Sunil,

I still can't even get a basic Datagrid to work on a live server. So

basically I am pretty much giving up on Flash Builder. If you can't

deploy projects to the web - there really is no point to using it or

wasting any more time on it. I'll tinker around a bit when I get spare

time, but for now I have all but given up on the product.

However, I really do appreciate your time.

Thanks,

Brad Lawryk

Adobe Community Professional: Dreamweaver

Northern British Columbia Adobe Usergroup: Manager

My Adobe Blog: http://blog.lawryk.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

Hi Brad,

Sorry to hear that you are facing issues with this. To help you, we need to understand exactly what those issues are. I know that

a. you are having a recordset on your server

b. you want to populate that in a Flex datagrid

I need to know the following

a. What is the backend you are using

b. How are you calling the service from Flex, Is it HTTPService, WebService or RemoteObject

c. related to question b, What is the exact error you are getting when you run your flex application

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

Hi Sunil,

What I have set up is so basic a child should be able to do it. Its a simple PHP/MySQL table with 5 records in it (an authour and a quote in each record). All it is is a simple thing I did up real quick for practice and trying to get something actually working. Its basically just a datagrid listing the authours and when you click on a name in the grid it displays a quote below the grid. Works great locally, just like any other project I have been playing around with to learn. But does not work live.

You can see it all its lovely errors at http://www.auroragraphix.com/quotes/Quotes.html

Ryan Stewart @ Adobe has already been awesome enough to help with what he could in private and it is certainly appreciated. But even within the Adobe Community Professionals groups no one seems to know how to put a project live on the web and there is no documentation. Took five minutes to throw the little test app together ..... almost two weeks to try and get it to work live on a server and counting.

Brad Lawryk

Adobe Community Professional: Dreamweaver

Northern British Columbia Adobe Usergroup: Manager

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

Hi Brad,

What is the version of MySQL that you are using in your production server? I believe this error can come when you are using 4.x, you should be using 5.1 or above.

Also what is the PHP version, Flash Builder requires 5.1 or above ?

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

Hi Sunil,

Already checked into that and it should be fine. First server I tried didn't meet the requirements but this one does according to the Flash Builder pge

PHP:  5.2.13

MySQL: 5.0.67

Brad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

Hi Brad,

The mentioned version numbers are fine. The MySQL error that you are getting is typically a unsupported command in that version of MySQL. Actually in Line 59, the error where it is coming, it is telling that there is an error while preparing the statement. This can happen only when that statement is not supported or the SQL is wrong, I suspect the former, just use this command to find the version select version(); (Also make sure your SQL is also correct)

Also To confirm the issue: I think you should try to directly execute the SQL, rather than FB generated code which uses prepare statement (which is much safer and avoids sql injection etc.). A sample would be like this

mysql_connect(localhost,$username,$password);

@mysql_select_db($database) or die( "Unable to select database");

$query = "SELECT * FROM AUTHORS";

mysql_query($query);

mysql_close();

Let me know, otherwise we can try to solve this by having a adobe acrobat connect session.

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2010 Jul 27, 2010

Copy link to clipboard

Copied

LATEST

Hi Sunil,

Once again, I appreciate your help. I have the database set up identical

on my local machine as the live server and it works locally just fine. I

wouldn't have a clue where to put that code right off hand although.

I am leaving for Vegas in the morning and won't be back at a computer

until Tuesday sometime. I'll give it a try when I get back.

Thanks again,

Brad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines