Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / May 2007



Tip: Looking for answers? Try searching our database.

How do I connect to a SQL Server DB?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aspidistra - 27 Feb 2007 12:47 GMT
I have a menu designed in Flash which has to pull back database records, how do I go about that? Every tutorial seems to be different and none are exactly what I am looking for.

thanks
Em
MotionMaker - 02 Mar 2007 12:43 GMT
Very true. This is a wide open field of decisions you have to make.

First choice you have is sending via URL variable encoding or XML. That will
define your tasks needed in ASP. As well would you want to simply (most
beginners would) just have the ASP send the URL variables or XML with
Response.write or are you planning a web service type of app.

For Flash you will find the examples in the docs are all you need to get the
data from the ASP and send back if necessary. Still the choices depend on the
server (ASP) choices.

For URL Encoding from ASP:
http://livedocs.macromedia.com/flash/8/main/00002329.html
For URL Encoding to and from ASP:
http://livedocs.macromedia.com/flash/8/main/00002336.html
For XML from ASP: http://livedocs.macromedia.com/flash/8/main/00002872.html
For XML to and from ASP:
http://livedocs.macromedia.com/flash/8/main/00002879.html
For overall details on data integration

Many folks like using the Flash 8 Pro DataGrid component for a quick UI to
display a SQL select result. You would populate it using
http://livedocs.macromedia.com/flash/8/main/00003263.html.

You can also bind the DataGrid to data providers such as an array so it
updates when the data source changes.

You also can use many of the Flash 8 Pro UI components in a data integration
that binds them to a data connector component:
http://livedocs.macromedia.com/flash/8/main/00000760.html component approach.  
You should review http://livedocs.macromedia.com/flash/8/main/00000756.html in
the Flash Docs for this approach.

If you need some decisions:

1. Select a scripting language: ASP, PHP, ASP.Net, JSP, Perl, ColdFusion
2. Select the database: mySQL, SQL Server, Oracle
3. Decide how you want to send data to and from Flash (XML, Url variables, Web
Services)
4. Write a server script that can do the database work you want and just use
html forms to prove those scripts out.
5. Look up the docs in Flash for #3 and do the Flash UI.

You might see from this that Flash or HTML would work with the same server
scripts.
tonyhigham - 02 Mar 2007 21:27 GMT
Excellent and detailed advice from MotionMaker. I would also add that Flash
remoting, once you get the hang of it, offers a very robust server
communication platform that has the advantage of transfering your SQL result
set in native AS arrays, so there is not serialization. There are
implementations for lots of different languages, but the PHP version is free.
Check out amfphp.org for more information.
knoxx - 07 Mar 2007 13:03 GMT
Hi,

If you are using ASP.NET and MS SQL Server, I'll be more than happy to email
you .Fla source files, as well as ASP.NET pages and a sql database, so you can
see how it's done. Also, depending how much traffic your application is going
to get, you might consider either publishing the data to an XML file for Flash
to read using the XML class or calling an ASP.NET page that connects to the
server everytime you hit your application using the LoadVars class.

Jaime
de_25 - 21 Mar 2007 15:31 GMT
Hi Knoxx
 I am in the same situation as aspidistra. If possible could you send me a
copy of a working example as I am having problems getting this to work. I have
a flash form set up which i want to be able to store/send data to an access db.
I have created the db and flsh form. I have managed to be able to display data
in a flash form using sourced material which uses an asp code file and the
laodVariables call to the asp code file's url which runs the asp code
connecting to the db.. Simply changing the select statement in the asp code and
linking it to a flash form control for capturing the data is not working. I am
unsure of the actionscript to use and also if any other changes are necessary
in the asp code apart from adding an sql INSERT procedure.
Hope you can help?

Regards

de_25
polarissno - 21 Mar 2007 20:18 GMT
Hey Knoxx, I am also interested in the code to do this.  I need to connect to SQL Anywhere, but I'm sure I could figure out the diferences.

Thanks in advance,

Teresa:confused;
Itamar Hassin - 30 May 2007 05:55 GMT
Hello Jaime,

Would it be possible to see the sources? I wrote a webService that
returns a DataTable but cannot parse it on the client AS side.
I would like to see how other people have done this to compare methods
(and see something that works!)

Many thanks
Itamar

> Hi,
>
[quoted text clipped - 7 lines]
>
>  Jaime
liquidplastik - 22 Mar 2007 21:21 GMT
So far my best experiences doing this have been with Web Services. I just prefer to use an ASP.NET Web Service to run my queries and have flash connect to it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.