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 / Flash Remoting / April 2005



Tip: Looking for answers? Try searching our database.

Can not fetch dataset from SQL Server using SqlClient

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cmxcmz - 06 Apr 2005 19:22 GMT
:confused;  I am using Flash remoting MX  to  fetch dataset. Before,  I use a
Access database to test it and it works just fine.  Then I switch to the SQL
Server using SqlClient.  It becomes no response, no data  and no error message.
When I replace Flash.DataSource + Flash.DataBind with Flash.Result, actually I
can see there is a dataset filled with data. The problem is  I can not fetch it
even it is there. Am I doing something wrong ?  Any suggestion welcomed.  Here
is the key part:  <code in the first frame>  #include 'NetServices.as'  if(
inited == null ) {     inited = true;         NetServices.setDefaultGatewayUrl(
'http://localhost/campaignmanager/gateway.aspx' );         gatewayConnection =
NetServices.createGatewayConnection();         gatewayConnection.setDebugID('Gateway
Connection');         mySQLService = gatewayConnection.getService(
'campaignmanager/services',this );     } function myGetCampaignList( queryString
) {      mySQLService.getCampaign( queryString );      }   //callback with result
data from ASP.Net service  function getCampaign_Result( result ) {       
    campaigns_DS_Results = result;      MessageBox('get the campaigns : Data
Fetched');      }  //callback with status or error message function
getCampaign_Status( error ) {        MessageBox(error.description ); }  
<getCampaingn.aspx :>  <%@ Page Language='C#' debug='true' %> <%@ Register
TagPrefix='MM' Namespace='FlashGateway' Assembly='flashgateway' %> <%@ import
namespace='System.Data' %> <%@ import namespace='System.Data.SqlClient' %>  
<html> <head>   <title>jasonmperry.com flash remoting sql query tool</title>
</head> <MM:Flash id='Flash' runat='server' /> </body>      <script langauge='C#'
runat='server'>         void Page_Load( Object sender, EventArgs e)     {         string
queryString = 'SELECT * FROM Campaigns';          //get Flash parameters         if(
Flash.Params.Count > 0 )         {             queryString = Flash.Params[0].ToString();         }  
        //create database connection         SqlConnection connection;         string
ConnectionString = ConfigurationSettings.AppSettings['dbconn'];         connection =
new SqlConnection( @ConnectionString );            connection.Open();                 //query
database and creates results         SqlDataAdapter adapter = new SqlDataAdapter(
queryString, connection );         DataSet dbData = new DataSet();          //places
results into a data set         adapter.Fill( dbData, 'Results' );                  
//Flash.Result = 'Count ' + dbData.Tables['Results'].Rows[0][1]; // Can return
the right data          Flash.DataSource = dbData.Tables['Results'];  
        Flash.DataBind();          connection.Close();     }      </script>  </html>
getCampaign.apsx   Text
m11533 - 15 Apr 2005 01:00 GMT
cmxcmz: Have you found a resolution to your problem? I am currently exploring
the use of Flash to replace an ASP.NET WebUI, and thus have lots of DataSets
(current originating in SQL Server and accessed via SqlClient) that I'll need
to exchange with the new Flash UI.
 
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.