Results 1 to 3 of 3

Thread: What is wrong with ASP-db?

  1. #1
    FR Guest

    What is wrong with ASP-db?

    Hi All

    I have 2 scripts, both use Northwind database.

    Script #1


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;


    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; tableMyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    Script #2


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;

    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; table

    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    The only difference between the 2 scripts is that the first uses the following statement:

    MyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    and the second uses the following statement:


    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    the only difference is of course the string:

    orderid||SELECT orderid,orderdate FROM Orders ;


    The first script produced the expected form with the fields (OrderID, Customer, and Employee) along its first row with the looked up values for both Customer and Employee. NO PROBLEM HERE

    The second script produced the form with only the (OrderID) field along its first row with the expected lookedup value for that field, BUT MADE BOTH THE Customer and Employee FIELDS AND THIER CONTENTS DISAPPEAR.

    This has been exactly the situation with every ACCESS database I have tried. I did not succeed in solving this problem with Technical Support so I am seeking all the help offered. Thanks alot



  2. #2
    Frank Guest

    What is wrong with ASP-db? (reply)

    You bring up an interesting point here as ASP-db&#39;s logic is to MAGIC before LookUp and the same field cannot be applied to both for the obvious reason - Cell after MAGIC is not likely to match any lookups. So, when both are defined - LookUp will win. That is why when you tried to apply both to ORDERID, it skipped the Magic. Your case is look me up and then replace me with myself and something else. It is a legi case. I tried to move the LookUp code before the Magic and then comment out the restrictions ... it works fine. But since the cell conversion has type checking in it and I have to go and check whether this opening up of both magic and lookup will not conflict with any other operations. If cleared, then I&#39;ll implement it in the coming release and I&#39;ll ask support to send you a patched copy for sure.

    Thanks,


    FK


    ------------
    FR at 5/11/00 6:49:20 PM

    Hi All

    I have 2 scripts, both use Northwind database.

    Script #1


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;


    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; tableMyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    Script #2


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;

    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; table

    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    The only difference between the 2 scripts is that the first uses the following statement:

    MyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    and the second uses the following statement:


    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    the only difference is of course the string:

    orderid||SELECT orderid,orderdate FROM Orders ;


    The first script produced the expected form with the fields (OrderID, Customer, and Employee) along its first row with the looked up values for both Customer and Employee. NO PROBLEM HERE

    The second script produced the form with only the (OrderID) field along its first row with the expected lookedup value for that field, BUT MADE BOTH THE Customer and Employee FIELDS AND THIER CONTENTS DISAPPEAR.

    This has been exactly the situation with every ACCESS database I have tried. I did not succeed in solving this problem with Technical Support so I am seeking all the help offered. Thanks alot



  3. #3
    Frank Guest

    What is wrong with ASP-db? (reply)

    I tested the patch and seemed to have no ill effect. I&#39;ll test it for a few more days and if Ok then I&#39;ll release it in the next release.

    FK

    ------------
    Frank at 5/11/00 9:01:28 PM

    You bring up an interesting point here as ASP-db&#39;s logic is to MAGIC before LookUp and the same field cannot be applied to both for the obvious reason - Cell after MAGIC is not likely to match any lookups. So, when both are defined - LookUp will win. That is why when you tried to apply both to ORDERID, it skipped the Magic. Your case is look me up and then replace me with myself and something else. It is a legi case. I tried to move the LookUp code before the Magic and then comment out the restrictions ... it works fine. But since the cell conversion has type checking in it and I have to go and check whether this opening up of both magic and lookup will not conflict with any other operations. If cleared, then I&#39;ll implement it in the coming release and I&#39;ll ask support to send you a patched copy for sure.

    Thanks,


    FK


    ------------
    FR at 5/11/00 6:49:20 PM

    Hi All

    I have 2 scripts, both use Northwind database.

    Script #1


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;


    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; tableMyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    Script #2


    <% Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the object
    MyDb.dbDSN=&#34;NWIND&#34; &#39;Choose the data source
    MyDb.dbcolor=&#34;4&#34; &#39;Pick an automatic color scheme
    MyDb.dbMode=&#34;form&#34; &#39;Display the data in &#39;form&#39; mode
    myDb.dbFormHideFlds=&#34;customerid,employeeid&#34 ; &#39;Hide these fields

    x1 = &#34;&#34;
    x1 = x1 & &#34;orderid,,#orderid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Customer</font></TH><TD ><font color=0000cc>#customerid# </font></TD><TH BGCOLOR=99CCFF align=right><font color=0000cc>Employee</font></TH><TD ><font color=0000cc>#employeeid# </font></TD> <TD>;&#34;

    MyDb.dbMagicCell = x1 &#39;Build up and set the &#39;Magic Cell&#39; string to layout the fields

    MyDb.dbFormTableTag = &#34;Border=3 CellPadding=5&#34;

    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    MyDb.dbSQL=&#34;Select * FROM [Orders]&#34; &#39;Select all records from the &#39;orders&#39; table

    MyDb.dbStatusBar=false &#39;Hide the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 Navigation buttons
    Mydb.dbNavigationIcon=&#34;std&#34; &#39;Use the &#39;standard&#39; graphical buttons
    MyDb.aspDBEP &#39;Call &#34;EP&#34; function to show the form!
    %>



    The only difference between the 2 scripts is that the first uses the following statement:

    MyDb.dbDisplayLookupList = &#34;(;|)customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;


    and the second uses the following statement:


    MyDb.dbDisplayLookupList = &#34;(;|)orderid||SELECT orderid,orderdate FROM Orders ;customerid||SELECT customerid,companyname FROM Customers;employeeid||SELECT employeeid,lastname &&#39;, &#39; & firstname FROM Employees&#34;

    the only difference is of course the string:

    orderid||SELECT orderid,orderdate FROM Orders ;


    The first script produced the expected form with the fields (OrderID, Customer, and Employee) along its first row with the looked up values for both Customer and Employee. NO PROBLEM HERE

    The second script produced the form with only the (OrderID) field along its first row with the expected lookedup value for that field, BUT MADE BOTH THE Customer and Employee FIELDS AND THIER CONTENTS DISAPPEAR.

    This has been exactly the situation with every ACCESS database I have tried. I did not succeed in solving this problem with Technical Support so I am seeking all the help offered. Thanks alot



Posting Permissions

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