alexviii 0 Report post Posted February 16, 2007 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 ----------------------------------------------------------------------------------------------------- <%@ 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 ----------------------------------------------------------------------------------------------------- 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 ----------------------------------------------------------------------------------------------------- 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 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 Share this post Link to post Share on other sites