Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 01:15
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  MySQL, PostgreSQL, MS SQL, Access (Moderators: Flash-db, Musicman, Ronald Wernecke, Jorge Solis, Andries Seutens)
| | |-+  accesing a
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: accesing a  (Read 4269 times)
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« on: 08/12/03, 19:57 »

can anyone help me out pliiz, i just need the commands and a general idea of how to connect my flash movie to an access database i dont need to insert or delete values for now i  just need a search in the flash movie
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #1 on: 08/13/03, 01:43 »

To get a basic understanding of how flash communicates with scripting, read the articles in the technical reference forum and even better do one of the tutorials.

Flash itself does not offer direct access to anything but files and serverside scripts.
Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #2 on: 08/14/03, 00:28 »

To get a basic understanding of how flash communicates with scripting, read the articles in the technical reference forum and even better do one of the tutorials.

Flash itself does not offer direct access to anything but files and serverside scripts.  
 

thanks for answering ronald,  what do you mean with server side scirpts, i know basic action script, and php and mysql i have it running on my pc i understand de basic amfphp examples, and created some of my own, very simple the just send arrays numbers pretty simple stuff im trying to understand a little better de database connection and that stuff, and with php and mysql i got the connection and that almost cover, but what i need to do right now is pretty simple, i need to do like a library program something like that that you put the subject your looking for and it displays wich books contain informtation on that subject the databases aint that big and its actually magazines where the subject will be search on but i dont need, the project to be in the internet a i just need it to work in 1 pc but i would like to try and do it in flash, what do you recomend me to do??
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #3 on: 08/14/03, 01:42 »

Hi,
first thing - flash never communicates with the database directly. It allways needs a middlware, like php.

So your solution must be done on the server using php. Flash is only the representing layer (front end) of that applicatin.

The first thing you have to go fore, is to built the data structures in mySQL and do the logic work in php.
Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #4 on: 08/15/03, 19:20 »

thanks for answering again ronald i wanted to do the program using flash and access cause it wouldnt be used in my computer, but i guess ill do it in my computer and let them access it trough the net.

please read this and tell me if im going the right way


imagine that you have hundreds of magazines and you need to find a topic
thats what i want the program to do so if im lookin for something with flash
it displays the number of the magazines that contain flash topics in it.
mm what the program needs to do is have a search box or somethings(if the searchbox is to complicated i will settle for links, tough i dont know how many topics there will be),
so ill display my tables so u can tell me what u see

create table magz
id primarykey
month
cover title


create table topics
idto
topic
cover title

each topic will have an id


Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #5 on: 08/15/03, 23:44 »

Hi,
the search will be done by a script, or at the end by the database engine.
Flash only takes the values and displays them nicely.
This is the only part of flash in this scenario.

So, if you have an application doing all the search stuff, you can do the display by flash.

The search will be don by SQL statements.

If you design the program to have an includefile for database connect, and scripts doing the search and communication stuff, you can easy convert to a real life database, if you are having trouble with access. And I promiss, as soon as this is a life application with lots of traffic, you will have troble with access  Wink.

But basicly design of db should be relativly easy. Mabe you want to store the publishing date and author? Or feedback? Huh

Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #6 on: 08/18/03, 01:23 »

hey ronald hi
i made some analisys
and remembered some stuff
i decided to do the program in access even tough i never used it

i created 3 tables

magazine with the fields
idmag
month
year
cover

theme
idtheme
name


i created those two using the wizard
but the third table i need it to put the foreign keys but i dont how to declare them in the design mode

so im trying to do them in in sql

create table mt
(magazine.idmag auto_increment,
theme.idtheme auto_increment,
foreign key (idmag) references revista
foreign key (idtheme) references tema
primary key (idmag,idtheme)
)


but it doesnt run it cause its says i have a bad sintaxis if you find it or know how to declare the foreing key in the desgin mode please tell me ok???

thankss
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #7 on: 08/18/03, 03:03 »

Hi,
Access has a limmited set of SQL. Foreign key definitions are done in the relations editor.

So, just define the structiure and make sure, that the datatype of the keyfields are identical to the original keyfields (auto increment fields are long INT).

You dont actualy need to do the foreignkey definitions, 'cause you are requesting the data by slect statement anyway, which you will write in the php file.

What is revista?

I think I did not understand all off your thoughts???

Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #8 on: 08/18/03, 10:24 »

revista= magazine
sorry about that

so  i define idmag and id theme as autoincrement in the original tables and define them
as long int in th mt table??
do i also let it know it has to search for the values in the other tables??
and wich will be the primary key in the mt table idmag or idthem or both, and if its both how do i do that, telling access its going to be 2 primary keys?
and in the relationships do i make them one to one only or do i have to search for the foreign key option cuase i cant find it

thanks again ronald



Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #9 on: 08/18/03, 10:46 »

Hi,
each table has its own primary key, which in turn is the foreign key for the link field.

Did I get you right, you will have a table with the articles, one with the magazines and one with themes.

Each magazine covers several themes and has several articles, an article covers one theme and is published in one magazine. Right?

How does a potential customer search?

Search and select of an article will be a two step mechanism.

Customer does the search, gets a list of potential articles, and then selects the article to read.

BTW: check for copyright problems before you realize this project  Wink Some publishers dont like projects like this. Sad




Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #10 on: 08/18/03, 23:27 »

hey ronald thanks for answering

theme = article

so my tables will end as it told u

1st table
MAGAZINE with the fields
idmag
month
year
cover

THEME
idtheme
nameofart

create table mt
(
MAGAZINE.idmag auto_increment,
THEME.idtheme auto_increment,
MAGAZINE.month
THEME.nameofart
foreign key (idmag) references MAGAZINE
foreign key (idtheme) references THEME
foreing key (month) references MAGAZINE
foreign key (nameofart) references THEME
primary key (idmag,idtheme)
)

for example if i wanted to do a search
ill do a sql query

select nameofart,month from mt
where idtheme = "whatever value"

so imagine we fill with some info the tables

first table MAGAZINE

idmag  ----------- month --------------------- year -------------------cover
1                          jan                               2003                           viruses
2                          feb                               2003                             hw
3                          mar                              2003                     operating systems
4                          apr                               2003                         networks



second table THEME

idtheme --------------- nameofart
1                                    trojans
2                                     worms
3                                       ram
4                                  hard drives
5                                  windows
6                                      linux
7                                     token ring
8                                    frame relay

*note a theme can apear in various mags lets asume a windows article or thme apears in mag 1 and 3


third table when ill try to relate them  mt    

idmag-------------------idtheme--------------------month---------------nameofart
1                                      5                               jan                          windows
3                                       6                              mar                         linux
3                                      5                               mar                        windows
2                                       2                              feb                          ram

so if a ran the query


select nameofart,month from mt
where idtheme = "5"


ill get
windows jan
winddows mar

thats about all ill nead

i dont think ill be able of having a search engine cuase i dont have an idea of how to do it
but while i learn how to ill use a catalog
that indicates the nameofart an its id

mm what u think, im i really lost??















Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #11 on: 08/19/03, 00:51 »

Hi,
you could offer a combo-box with themes, that in turn delivers a list of articles, when selected.

So first you would select your themes table into the combo, and on the change event, you would do the other select statement into a textbox.

'cause the data in return could be quite a bit, and they should be structured, I would transfer them by XML data stream.
At least for the combobox.
So your first script would deliver something like:

<themes><theme name="trojans" id="1" /><theme name="worms" id="2" />.....</themes>

then you can fill with that your combobox and when a user does a select, you request the data by themeID.
Logged

happy flashing
Cool
Ronald
cho8
Seasoned Programmer
***
Posts: 134


panchopc@gmail.com
View Profile Email
« Reply #12 on: 08/19/03, 10:59 »

now that you mention xml i found a tutorial
but i havent taken a look a it files
http://www.flashkit.com/tutorials/Dynamic_Content/A_Simple-Joachim_-802/index.php

something like that is what i want
but i havent work with xml before  Undecided
do i have to configure apache so it works or it just works without doing nothing like html
i dont mind if the project is done only in access like i told u before a dont need it for the internet. but if you think its the better way to go i wouldnt mind learning how to do it

so pliz tell me how do i start working with xml, ok

by the way do you think the tables structure is ok???

thanks again ronald
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #13 on: 08/19/03, 11:21 »

Hi,
you diónt have to do anything to configuration.

The mother of all MLs is SGML. HTML is a subset of SGML and XML is a subset of SGML.

So XML is somthing like HTML, it is just more flexible and, as the word says, extensable.

XML is nothing more than a textformat with special meanings of the tags. Tags are looking like in HTML and allways need an endtag.

Thats more or less it.  Wink

There are parsers for XML, which enable you to walk through the structure. And this is the important part, which makes it easy to handle and still able to transfer structured data.

Flash has an integrated parser which works quite well.

Dont worry about it, just get into it reading the basics in a tutorial or manual, and then go doing it.
Logged

happy flashing
Cool
Ronald
Sean
Server what's that
*
Posts: 6



View Profile Email
« Reply #14 on: 08/19/03, 19:50 »

HI,

I need to jump in with a simple question here.

My Flash movie is calling an ASP page & returning variables

i.e. &success=1&

Could I call an ASP page and have that ASP page send back XML instead & then use the flash XML parser to use the data?

SO with 1 loadvariables call I could call ASP page & return XML structured data to my Flash.

If so, then I will be doing good because that will let me return recordsets right?

Please say yes, please say yes  Huh
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!