Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Flash, Sqlserver And Asp
alexviii
post Feb 16 2007, 09:41 AM
Post #1


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 5-August 06
From: Rome (born only)
Member No.: 27,852



Hi everyones,

I going to bang my head because I have been trying to show SqlServer 2000 data in (Flash Mx Professional 2004) DataGrid I am working with ASP.NET but I am still unable to show data in datagrid can anyone help me..


here is my files


-----------------------------------------------------------------------------------------------------
product.aspx
-----------------------------------------------------------------------------------------------------

CODE
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="product.aspx.vb" Inherits="flashremoting.product"%>
<%@ Register TagPrefix="Macromedia" Namespace="FlashGateway" Assembly="flashgateway" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>product</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<Macromedia:Flash ID="flash" runat="server"></Macromedia:Flash>

</form>
</body>
</HTML>

-----------------------------------------------------------------------------------------------------
product.aspx page END
-----------------------------------------------------------------------------------------------------


-----------------------------------------------------------------------------------------------------
product.aspx.vb
-----------------------------------------------------------------------------------------------------

CODE
Public Class product
Inherits System.Web.UI.Page


Dim Proobj As New result_product
Dim dsobj As DataSet
Protected WithEvents filUpload As System.Web.UI.HtmlControls.HtmlInputFile

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
flash.DataSource = Proobj.proResult
flash.DataBind()


End Sub


End Class

-----------------------------------------------------------------------------------------------------
product.aspx.vb page END
-----------------------------------------------------------------------------------------------------


-----------------------------------------------------------------------------------------------------
reuslt_product.vb
-----------------------------------------------------------------------------------------------------

CODE
Imports System.Data.SqlClient

Public Class result_product

Dim con As SqlConnection
Dim adpt As SqlDataAdapter
Dim ds As DataSet
Dim dt As DataTable

Function proResult() As DataSet
con = New SqlClient.SqlConnection
con.ConnectionString = "data source=WIN-SHAHZEB;initial catalog=Remoting; User id=sa;Password=sa"
adpt = New SqlClient.SqlDataAdapter("Select * from Product", con)
ds = New DataSet
adpt.Fill(ds, "Product")
Return ds
End Function
End Class

-----------------------------------------------------------------------------------------------------
reuslt_product.vb END
-----------------------------------------------------------------------------------------------------


FLASH FILE

CODE
import mx.remoting.Connection;
import mx.remoting.NetServices;
import mx.remoting.debug.NetDebug;
import mx.remoting.DataGlue;

if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost/Integrate_Flash_with_DOTNET/Practice/flashremoting/gateway.aspx");
gatewayconnection = NetServices.createGatewayConnection();
folName = "Integrate_Flash_with_DOTNET.Practice.flashremoting.myfile";
flashService = gatewayconnection.getService(folName, this);
}
var col = new FGridColumn( "delete" );
col.setEditable( false );
col.setHeader( "" );
col.setCellSymbol( "DeleteRecord" );
grid.addColumn( col );
col = new FGridColumn( "contact_id" );
col.setEditable( false );
col.setHeader( "User ID" );
col.setSortFunction ( function (a,b){return a.contact_id-b.contact_id;} );
grid.addColumn(col);
col = new FGridColumn("first_name" );
col.setHeader( "First Name" );
grid.addColumn( col );
col = new FGridColumn( "last_name" );
col.setHeader( "Last Name" );
grid.addColumn( col );
col = new FGridColumn( "middle_name" );
col.setHeader( "Middle Name" );
grid.addColumn( col );
col = new FGridColumn( "email" );
col.setHeader( "Email" );
grid.addColumn( col );
col = new FGridColumn( "phone" );
col.setHeader( "Phone" );
grid.addColumn( col );

grid.spaceColumnsEqually();
grid.getColumnAt( 0 ).setWidth( 20 );
grid.setEditable( true );
grid.showGridLines( true );
grid.showBorder( true );
grid.alternateRowColors( 0xFFFFFF, 0xEEEEEE );
grid.setSortableColumns( true );


function blankRecord()
{
return {
contact_id:"[Add Record]",
first_name:"",
last_name:"",
middle_name:"",
email:"",
phone:""
};
}


MAX_ROWS = 15;
function constrainGridSize ()
{
_root.grid.setRowCount( _root.grid.getLength() <
_root.MAX_ROWS ? _root.grid.getLength() : _root.MAX_ROWS );
}



product();

function product()
{
flashService.product();
}
function product_Result (result_rs)
{
grid.dataProvider(result_rs);
// DataGlue.bindFormatStrings(result_grd,result_rs,"asdgds","asd");
}
function product_Status (error)
{
resulttxt.text = "you got an error" + error.description;
}
stop();



Anyone have courage to solve this dilemma.

10x
bye
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Print With Flash And Datagrids Without Resizing!(3)
  2. Macromedia Flash(9)
  3. How To Get High Quality Gif Images In Flash(1)
  4. Appeal For Flash-related Help [kinda Urgent](0)
  5. Playing Flash Movies Without The One-click Activation: Simple Insertion Of Javascript(4)
  6. Flash Player Simpleviewer Using Flickr And Picassa2(0)
  7. Here Is A Really Good Flash Tutorial Site(7)
  8. Flash Tutorial : Realistic Ball Movement(0)
  9. Flash Vs. Java Applets(2)
  10. Flash(3)
  11. Need Sugation About Flash(4)
  12. Move The Movie Clip In Flash(2)
  13. Flash Coding(1)
  14. Flash - Streaming Flv With Interactible Objects(3)
  15. Flash Problem(9)
  1. Flash As3 Question(2)
  2. Flash, Php And Facebook Integration(0)
  3. Flash Action Scripting Help Needed(6)


 



- Lo-Fi Version Time is now: 12th October 2008 - 09:04 PM