Results 1 to 7 of 7

Thread: How to debug EmbeddedGrid SQL statements

  1. #1
    Join Date
    Aug 2005
    Posts
    18

    How to debug EmbeddedGrid SQL statements

    We are trying to fill an embedded call with a sql statement in the macro. The grid is returned with the main table, but the sql to fill the Embedded grid only returns No Data. We only need to know how you would debug the Embeddedgrid samples in the Tornado Manual.
    Thanks for the Help.
    Kriss Kline
    NTC

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    Give an example using Nwind or equivalent. The following is a Nwind example. Modify this code to reflect your case.



    Dim E64 As New Tornado.z
    With E64
    .dbQP = "U=60| S=11|D=Nwind|gdf=CustomerID, CompanyName, ContactName"
    .dbGridMagicCell = "(;![]#|~/+{})field=CompanyName|Macro=#1#<br>#4#<br>#5#, #7#<p>#2#<br>#4#<br>#9#!field=ContactName|Macro=SQ L0:SELECT OrderID,OrderDate,RequiredDate,ShippedDate from orders where customerID= '#0#'"
    .dbNameMap = "field=CustomerID|alias=ID,field=CompanyName|alias =Customer,field=ContactName|alias=Orders"
    .dbEmbeddedGridNameMap = "field=OrderID|alias=ID,field=OrderDate|alias=Orde red,field=RequiredDate|alias=Required,field=Shippe dDate|alias=Shipped"
    .dbSQL = "SELECT CustomerID,CompanyName,ContactName,ContactTitle,Ad dress,City,Region,PostalCode,Country,Phone,Fax FROM Customers"
    .dbTextHolder = "Title=Tornado Demo - MagicCell - Master with embedded Details"
    .ASPdbNET()
    End With



    FK
    Last edited by Frank; 02-05-2008 at 12:19 PM.

  3. #3
    Join Date
    Oct 2002
    Posts
    933

    No data return for embedded magic grid

    I think you mean how to catch the no data return from the embedded grid magiccell. There is no 'Extended' macro support. However, there is support when there is no data return. The Cell is hard coded as "No Data". I'll make this more flexible and let user define their own embedded cell text. Now change the previous example to -> where customerID= '#1#' instead of '#0#'', the there will be no data return. See the Effect of 'No Data'.



    The following is from the manual ->

    Format - Obj.dbEmbeddedGridMagicCell ="(;,[]#|~/+{})Field | tag | Macro"

    Normal macro is only for embedded MagicCell - Basic only, No Extended or Preprogrammed.


    Fk
    Last edited by Frank; 02-05-2008 at 05:24 PM.

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    Fixed - now No Data will be default when dbBlankText is blank. The following code will catch the no data and replace with custom text.

    Dim E64 As New Tornado.z
    With E64
    .dbQP = "U=60| S=11|D=Nwind|gdf=CustomerID, CompanyName, ContactName"
    .dbGridMagicCell = "(;![]#|~/+{})field=CompanyName|Macro=#1#<br>#4#<br>#5#, #7#<p>#2#<br>#4#<br>#9#!field=ContactName|Macro=SQ L0:SELECT OrderID,OrderDate,RequiredDate,ShippedDate from orders where customerID= '#1#'"
    .dbNameMap = "field=CustomerID|alias=ID,field=CompanyName|alias =Customer,field=ContactName|alias=Orders"
    .dbEmbeddedGridNameMap = "field=OrderID|alias=ID,field=OrderDate|alias=Orde red,field=RequiredDate|alias=Required,field=Shippe dDate|alias=Shipped"
    .dbSQL = "SELECT CustomerID,CompanyName,ContactName,ContactTitle,Ad dress,City,Region,PostalCode,Country,Phone,Fax FROM Customers"
    .dbTextHolder = "Title=Tornado Demo - MagicCell - Master with embedded Details"
    .dbBlankText = "Custom Blank Text"
    .ASPdbNET()
    End With

  5. #5
    Join Date
    Aug 2005
    Posts
    18
    No Frank, I get the No Data but I believe that the sql macro should be returning data.

  6. #6
    Join Date
    Oct 2002
    Posts
    933
    In that case, show me your code and also change the above example to reflect your case. In the example the Embedded SQL is ->

    Macro=SQL0:SELECT OrderID,OrderDate,RequiredDate,ShippedDate from orders where customerID= '#1#'

    what is your SQL looks like.


    Fk

  7. #7
    Join Date
    Oct 2002
    Posts
    933
    please also explain what you mean but 'debug' the sample.

    Fk

Posting Permissions

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