A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Made a mistake, need some help... MS SQL and Flash

  1. #1
    Senior Member
    Join Date
    Oct 2005

    Made a mistake, need some help... connecting MS SQL and Flash

    I took a job to make a flash based form, which connects to a SQL database. I thought it very simple; I would use PHP and set up the database, a day or two's work...

    Then, after I was done, I found out the fact I need to use MS SQL, which I have never worked with before. And the server running everything is a Windows Server, not a *nix server.

    I've always done web work, always on *nix servers, usually with PHP (if not, I hacked some Perl or Python together), and always with MySQL.

    What is the quickest and simplest way to get a crash course in using Flash to communicate with a MS SQL database on a Windows server? I am trying to find out if I can use PHP or not... I don't know if it is installed on the machine, or if not if they would be willing to do so.

    Thanks for any help you can provide!

    (I use CS4, am very good with AS2 and passable with AS3, if that makes any difference)
    Last edited by kargrafx; 01-19-2010 at 02:17 AM.

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Just a :bump: . . . anything? anyone? please?

  3. #3
    Eternal Newbie
    Join Date
    Apr 2006
    Bitter cold Hell of the crappy NW
    MS SQL isn't much different than MySQL. There are slight variances in syntax, but not so much you would notice. Enough though, that you couldn't dump your MySQL db and import it directly into the MS SQL DB.

    There are DB converters out there (some free...yikes!) but MS SQL has a built in feature called DTS.

    Microsoft DTS is a data manipulation tool that is included with Microsoft SQL Server. DTS is excellent for moving data between various formats and systems such as databases, spreadsheets, and even HTML. The Microsoft Data Transformation Service can be very complex, but most of us will only ever need to use the Import/Export Wizard that is included with DTS.

    Using DTS is fairly straightforward, you choose an ODBC data source to read data from, and then select an ODBC data source to convert the data to. You are then given a list of tables to convert, with an option of renaming the destination table and even performing basic transformations on the data before it is inserted into the target database. These transformations are performed using Visual Basic scripting. In addition, you are given control over the table creation statements to be used, allowing you to fine-tune the MySQL table definitions to add parameters such as table handler (InnoDB, BDB, etc) to the script that will be executed.

    DTS also has the ability to perform scheduled data transformations, something that can be very useful when you are using MySQL for analysis of SQL Server data or when you just want the latest data available as you work on your application migration.
    But for your communication needs... you will probably have to switch from php to asp (again virtually the same, .asp is just "owned" by MS). Unless you use FastCGI or Zend PHP

    Again though, if you know php, you can pick up asp fairly easily. Usually just syntax differences. Nothing a Google search won't cure.

    In Flash you then just tell it to load or POST or whatever to page.asp instead of page.php.

    Now if you need the ASP (know on backend as the .NET) to talk to Flash, then you run into problems. It is difficult but possible. AJAX will be key, or you can try using JavaScript as a bridge between. Or both.

    Hope that helps some.

    If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN

  4. #4
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Lincoln City
    If you're using as3 then you can use the netConnection class to talk with the server. It's messier than say, amfphp, but it works faster than the whole ajax thing. Or, use JSON libraries at json.org to handle the data; makes it a little easier but definitely slower.
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center