Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 12th, 2003, 04:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default Flash & SQL

Hi there

I'm attempting to get Flash MX and SQL to converse - I've never done it before with Flash - can anyone help me - I need to create an odbc connection to the db and then request some records within Flash.

Many thanks

Adam
Reply With Quote
  #2 (permalink)  
Old September 12th, 2003, 08:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know Flash makes Data connection kit for this purpose http://www.macromedia.com/software/dataconnection. The new Flash MX 2004 profressional is suppose to include this.

I have made the connection outside of Flash and imported it in through the source link, I'm not sure how dynamic you need it to be.
VALUE="Flashfile.swf?Counter=1111">
src="Flashfile.swf?Counter=1111"

loadVariablesNum ("counter.asp", 0);
start_Count = int(Counter)
cur_Count = (start_Count + 1)
Reply With Quote
  #3 (permalink)  
Old September 15th, 2003, 08:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Hi Harpua

Well, I need to be able to read data from a SQL database - How do I make the connection? Do I write the SQL SELECT statement in flash for the data that I want to retrieve?

Thanks, Adam
Reply With Quote
  #4 (permalink)  
Old September 15th, 2003, 09:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry I'm not always clear sometimes. I use ASP and create a connection string outside of Flash on my page, from there it will pull the Data in. The only problem with this is that it isn't dynamic. Once the page is loaded you would have to refresh the page to get new data, which kind of defeats the purpose of Flash. For the more dynamic content I would check into the data connection kit.

<%
Set objConn = Server.CreateObject("ADODB.Connection")
        strConnect = "Provider=SQLOLEDB;Data Source=00.000.000.00;User Id=XXXXX;Password=XXXXX;Initial Catalog=XXXXXX;"
objConn.Open strConnect

    strSQL = "SELECT LastCount FROM TableName;"

    Set objCmd = Server.CreateObject("ADODB.Command")
    objCmd.ActiveConnection = objConn

    objCmd.CommandText = strSQL
    objCmd.CommandType = adCmdText

    Set objSelect = objCmd.Execute
    Set objCmd = Nothing

%>

VALUE="Flashfile.swf?Counter=<%= objSelect("LastCount") %>">
src="Flashfile.swf?Counter=<%= objSelect("LastCount") %>"

Inside Flash___
loadVariablesNum ("counter.asp", 0);
start_Count = int(Counter)
cur_Count = (start_Count + 1)
Reply With Quote
  #5 (permalink)  
Old December 22nd, 2006, 07:45 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: Orange County, CA, USA.
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your flash (running on a web client) needs to talk to your web server and your web server talks to the SQL server. For this to work you need to code in flash, a web scripting language like php/asp/cold fusion/jsp, and then the web server talks sql to your database.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report & VB6 & SQL Server wlho VB How-To 2 June 5th, 2013 01:58 AM
flash & c# titto_oo7 C# 1 April 29th, 2006 02:41 PM
JavaScript & Flash lmod Javascript 2 September 6th, 2005 10:18 AM
flash & asp/sql integration Adam H-W Flash (all versions) 2 February 18th, 2004 12:49 PM
sql & join tables & find a field in multiple table trangd Beginning PHP 2 January 29th, 2004 07:18 PM



All times are GMT -4. The time now is 11:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.