Results 1 to 2 of 2

Thread: MagicCell bug in conjunction with colminmaxsql

  1. #1
    Uwe Kraul Guest

    MagicCell bug in conjunction with colminmaxsql

    hi list,
    seems there is a problem in the magiccell when using it with cominmaxsql. here is a small example for the pubs-db:

    Set X= Server.CreateObject("ASP.DB&#34
    X.dbUnit = "19999"
    X.dbMode = "Grid"
    X.dbOptions = "CellFontTag=font size=1"
    X.dbDBType = "SQL"
    X.dbDSN = "DSN=PUBS"
    X.dbGridInc = 30
    X.dbGridIncMax = 30
    X.dbMagicCell = "(;,[]#|~/+{})dofweek,,(#1#|EQN|1||monday~#1#|EQN|2||tuesday ~#1#|EQN|3||wednesday~#1#|EQN|4||thursday~#1#|EQN| 5||friday~#1#|EQN|6||saturday~#1#|EQN|7||sunday)&# 34;
    X.dbSQL = "SELECT datepart(dw,hire_date) as dofweek,count(*) as sales FROM employee group by datepart(dw,hire_date) order by datepart(dw,hire_date)"
    x.dbColGraph = "employee,sales,,,bluebar.gif,8;"
    X.dbColGraphMinMaxSQL = "SELECT 0,count(*) as sales FROM employee group by datepart(dw,hire_date) order by datepart(dw,hire_date)"
    x.dbImageDir = "/aspdb/images"
    x.dbDebug=4
    X.ASPdb


    try to comment out magiccell statement. the row-value returns 1 to 7. but when trying to convert this values to the weekday names it uses the values from the second row.

    best regards uwe

  2. #2
    Mark Guest

    MagicCell bug in conjunction with colminmaxsql (reply)

    Hi Uwe,
    You and I have already solved this problem via email, but for the benefit of others, I'll answer it here also...

    dbMagicCell uses either Field NAMES or Field NUMBERS. If you use numbers, they start at ZERO, not ONE. So just change all of the #1#'s in your dbMagicCell statement to #0#.

    Mark.



    ------------
    Uwe Kraul at 4/19/2002 3:25:19 AM

    hi list,
    seems there is a problem in the magiccell when using it with cominmaxsql. here is a small example for the pubs-db:

    Set X= Server.CreateObject("ASP.DB&#34
    X.dbUnit = "19999"
    X.dbMode = "Grid"
    X.dbOptions = "CellFontTag=font size=1"
    X.dbDBType = "SQL"
    X.dbDSN = "DSN=PUBS"
    X.dbGridInc = 30
    X.dbGridIncMax = 30
    X.dbMagicCell = "(;,[]#|~/+{})dofweek,,(#1#|EQN|1||monday~#1#|EQN|2||tuesday ~#1#|EQN|3||wednesday~#1#|EQN|4||thursday~#1#|EQN| 5||friday~#1#|EQN|6||saturday~#1#|EQN|7||sunday)&# 34;
    X.dbSQL = "SELECT datepart(dw,hire_date) as dofweek,count(*) as sales FROM employee group by datepart(dw,hire_date) order by datepart(dw,hire_date)"
    x.dbColGraph = "employee,sales,,,bluebar.gif,8;"
    X.dbColGraphMinMaxSQL = "SELECT 0,count(*) as sales FROM employee group by datepart(dw,hire_date) order by datepart(dw,hire_date)"
    x.dbImageDir = "/aspdb/images"
    x.dbDebug=4
    X.ASPdb


    try to comment out magiccell statement. the row-value returns 1 to 7. but when trying to convert this values to the weekday names it uses the values from the second row.

    best regards uwe

Posting Permissions

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