Results 1 to 3 of 3

Thread: dbEditLookUpXref and dbEditAddROFlds problem

  1. #1
    Glauco Guest

    dbEditLookUpXref and dbEditAddROFlds problem

    When I add a new record, I need a field to be looked up and read only.
    In other words, I need something which merges theese two examples:
    http://www.aspdb.com/v2/V2_Lookup-RO.asp
    http://www.aspdb.com/v2/V2_Add_RO.asp
    This is a simple example code connecting to the Microsoft Northwind database:
    <%
    Set X=Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = 101
    X.dbDSN = &#34;NWIND&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,ReportsTo from Employees&#34;
    X.dbNavigationItem = &#34;Next,Prev,Add,Update,Delete&#34;
    X.dbEditParams = &#34;TableName=Employees,BookMarkFlds=0&#34;
    X.dbEditFlds = &#34;LastName,ReportsTo[2]&#34; &#39; EditFlds 0&1
    X.dbDisplayLookUpList = _
    &#34;(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees&#34;
    X.dbEditDropFlds = _
    &#34;(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees&#34;
    &#39; First parameter: taken from dbEditFlds
    &#39; Second parameter taken from dbSQL.
    X.dbEditLookUpXref = &#34;1,2;&#34; &#39; dbEditFlds, dbSQL
    X.dbEditAddROFlds = &#34;ReportsTo&#34;
    X.dbEditUpdateROFlds = &#34;ReportsTo&#34;
    X.ASPdb
    %>
    Adding a new record, reportsTo should default to 2 and be shown as &#34;Fuller&#34; (at least, it is what
    I would like to get :-) and be a read only field.
    Updating and/or deleting, should show the look up value of the current reportsTo field (and it
    is exactly what it does).

    Thus, for updating and deleting it works as I exptect, but, when I add a new record, the reports
    to field is simply shown as &#34;2&#34;.

    Can you tell me where I am wrong, or can you give me an address for a working example?

    It may be that example http://www.aspdb.com/UNO/UNO-AddLookUp1.asp is the answer, but
    it results in a type mismatch error, when I try to open the page. Furthermore, it
    requires the ASP-db 2000 version. Is it possible to get such result with the Enterprise edition?

    Thanks in advance.


  2. #2
    Frank Kwong Guest

    dbEditLookUpXref and dbEditAddROFlds problem (reply)

    Update RO lookup is implemented not too long ago. Are you talking about ADD RO Lookup ? You guys ever get satisfied ?

    FK

    ------------
    Mark at 12/23/00 2:18:36 PM

    Glauco,

    I tried your example that you included. It added the record properly, but you&#39;re right, the field didn&#39;t show the looked-up value on the add screen. The add screen showed a &#34;2&#34; but at least it DID add the record properly. It appears to be a limitation of the dbEditLookUpXref property.

    Mark.


    ------------
    Glauco at 12/23/00 12:27:57 PM

    When I add a new record, I need a field to be looked up and read only.
    In other words, I need something which merges theese two examples:
    http://www.aspdb.com/v2/V2_Lookup-RO.asp
    http://www.aspdb.com/v2/V2_Add_RO.asp
    This is a simple example code connecting to the Microsoft Northwind database:
    <%
    Set X=Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = 101
    X.dbDSN = &#34;NWIND&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,ReportsTo from Employees&#34;
    X.dbNavigationItem = &#34;Next,Prev,Add,Update,Delete&#34;
    X.dbEditParams = &#34;TableName=Employees,BookMarkFlds=0&#34;
    X.dbEditFlds = &#34;LastName,ReportsTo[2]&#34; &#39; EditFlds 0&1
    X.dbDisplayLookUpList = _
    &#34;(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees&#34;
    X.dbEditDropFlds = _
    &#34;(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees&#34;
    &#39; First parameter: taken from dbEditFlds
    &#39; Second parameter taken from dbSQL.
    X.dbEditLookUpXref = &#34;1,2;&#34; &#39; dbEditFlds, dbSQL
    X.dbEditAddROFlds = &#34;ReportsTo&#34;
    X.dbEditUpdateROFlds = &#34;ReportsTo&#34;
    X.ASPdb
    %>
    Adding a new record, reportsTo should default to 2 and be shown as &#34;Fuller&#34; (at least, it is what
    I would like to get :-) and be a read only field.
    Updating and/or deleting, should show the look up value of the current reportsTo field (and it
    is exactly what it does).

    Thus, for updating and deleting it works as I exptect, but, when I add a new record, the reports
    to field is simply shown as &#34;2&#34;.

    Can you tell me where I am wrong, or can you give me an address for a working example?

    It may be that example http://www.aspdb.com/UNO/UNO-AddLookUp1.asp is the answer, but
    it results in a type mismatch error, when I try to open the page. Furthermore, it
    requires the ASP-db 2000 version. Is it possible to get such result with the Enterprise edition?

    Thanks in advance.


  3. #3
    Frank Kwong Guest

    dbEditLookUpXref and dbEditAddROFlds problem (reply)

    OK, Santa Kwong is here... fixed... test it in the next release !!!


    FK


    ------------
    Glauco at 12/23/00 12:27:57 PM

    When I add a new record, I need a field to be looked up and read only.
    In other words, I need something which merges theese two examples:
    http://www.aspdb.com/v2/V2_Lookup-RO.asp
    http://www.aspdb.com/v2/V2_Add_RO.asp
    This is a simple example code connecting to the Microsoft Northwind database:
    <%
    Set X=Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = 101
    X.dbDSN = &#34;NWIND&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,ReportsTo from Employees&#34;
    X.dbNavigationItem = &#34;Next,Prev,Add,Update,Delete&#34;
    X.dbEditParams = &#34;TableName=Employees,BookMarkFlds=0&#34;
    X.dbEditFlds = &#34;LastName,ReportsTo[2]&#34; &#39; EditFlds 0&1
    X.dbDisplayLookUpList = _
    &#34;(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees&#34;
    X.dbEditDropFlds = _
    &#34;(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees&#34;
    &#39; First parameter: taken from dbEditFlds
    &#39; Second parameter taken from dbSQL.
    X.dbEditLookUpXref = &#34;1,2;&#34; &#39; dbEditFlds, dbSQL
    X.dbEditAddROFlds = &#34;ReportsTo&#34;
    X.dbEditUpdateROFlds = &#34;ReportsTo&#34;
    X.ASPdb
    %>
    Adding a new record, reportsTo should default to 2 and be shown as &#34;Fuller&#34; (at least, it is what
    I would like to get :-) and be a read only field.
    Updating and/or deleting, should show the look up value of the current reportsTo field (and it
    is exactly what it does).

    Thus, for updating and deleting it works as I exptect, but, when I add a new record, the reports
    to field is simply shown as &#34;2&#34;.

    Can you tell me where I am wrong, or can you give me an address for a working example?

    It may be that example http://www.aspdb.com/UNO/UNO-AddLookUp1.asp is the answer, but
    it results in a type mismatch error, when I try to open the page. Furthermore, it
    requires the ASP-db 2000 version. Is it possible to get such result with the Enterprise edition?

    Thanks in advance.


Posting Permissions

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