-
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("ASP.db"
X.dbUnit = 101
X.dbDSN = "NWIND"
X.dbMode = "Grid"
X.dbSQL = "SELECT EmployeeID,LastName,ReportsTo from Employees"
X.dbNavigationItem = "Next,Prev,Add,Update,Delete"
X.dbEditParams = "TableName=Employees,BookMarkFlds=0"
X.dbEditFlds = "LastName,ReportsTo[2]" ' EditFlds 0&1
X.dbDisplayLookUpList = _
"(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees"
X.dbEditDropFlds = _
"(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees"
' First parameter: taken from dbEditFlds
' Second parameter taken from dbSQL.
X.dbEditLookUpXref = "1,2;" ' dbEditFlds, dbSQL
X.dbEditAddROFlds = "ReportsTo"
X.dbEditUpdateROFlds = "ReportsTo"
X.ASPdb
%>
Adding a new record, reportsTo should default to 2 and be shown as "Fuller" (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 "2".
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.
-
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're right, the field didn't show the looked-up value on the add screen. The add screen showed a "2" 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("ASP.db"
X.dbUnit = 101
X.dbDSN = "NWIND"
X.dbMode = "Grid"
X.dbSQL = "SELECT EmployeeID,LastName,ReportsTo from Employees"
X.dbNavigationItem = "Next,Prev,Add,Update,Delete"
X.dbEditParams = "TableName=Employees,BookMarkFlds=0"
X.dbEditFlds = "LastName,ReportsTo[2]" ' EditFlds 0&1
X.dbDisplayLookUpList = _
"(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees"
X.dbEditDropFlds = _
"(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees"
' First parameter: taken from dbEditFlds
' Second parameter taken from dbSQL.
X.dbEditLookUpXref = "1,2;" ' dbEditFlds, dbSQL
X.dbEditAddROFlds = "ReportsTo"
X.dbEditUpdateROFlds = "ReportsTo"
X.ASPdb
%>
Adding a new record, reportsTo should default to 2 and be shown as "Fuller" (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 "2".
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.
-
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("ASP.db"
X.dbUnit = 101
X.dbDSN = "NWIND"
X.dbMode = "Grid"
X.dbSQL = "SELECT EmployeeID,LastName,ReportsTo from Employees"
X.dbNavigationItem = "Next,Prev,Add,Update,Delete"
X.dbEditParams = "TableName=Employees,BookMarkFlds=0"
X.dbEditFlds = "LastName,ReportsTo[2]" ' EditFlds 0&1
X.dbDisplayLookUpList = _
"(;|)ReportsTo||SELECT EmployeeID, LastName FROM Employees"
X.dbEditDropFlds = _
"(;|)ReportsTo||||SELECT EmployeeID, LastName FROM Employees"
' First parameter: taken from dbEditFlds
' Second parameter taken from dbSQL.
X.dbEditLookUpXref = "1,2;" ' dbEditFlds, dbSQL
X.dbEditAddROFlds = "ReportsTo"
X.dbEditUpdateROFlds = "ReportsTo"
X.ASPdb
%>
Adding a new record, reportsTo should default to 2 and be shown as "Fuller" (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 "2".
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
-
Forum Rules
|
|