1. "Method not valid for object" error
I am developing a database for storing virus test requests and results
in a laboratory. The main entry form has two tables in it's data model
- the "patient" table and the "request" table
When a new request is made, a three letter code is used to identify
the test (eg, CNS = central nervous system viruses) and I want to
create a new record in the appropriate result table (eg, CNS) to take
the results when they becoms available. The result table does not
often have the same name as the test request.
I have included the code below which is attached to the "Depart"
method of the "code" field of the "request" table. The attempt is to
retreive the name of the appropriate table from the "Disease" table,
open it with a Tcursor and insert a new record with the current
information.
I get the error "The method is not valid for the object" with this
code and I tried the code attached to a pushbutton and got the same
fault.
- - - - - - - - -
var
tca, tcb TCursor
sta, stb, stc, std String
endVar
sta = Virology_Number.value
stb = Lab_Number.value
stc = self.value
tca.open("Diseases.db")
if not tca.code.locate(stc) then
disableDefault
msgInfo("Warning","You have not entered a valid request code")
else
std = tca.Table.value
endIf
if not tcb.open("std") then
msgInfo("Warning","A new record was not inserted into the appropriate
table!")
else
if not tcb.Lab_Number.locate(stb) then
tcb.edit()
if tcb.InsertRecord() then
tcb.Virology_Number = sta
tcb.Lab_Number =stb
endIf
tcb.endEdit()
endIf
endIf
- - - - - - - - - - - -
Apologies for the lengthy message - I felt it was necessary to explain
the problem
Any answers greatly appreciated
Brendan O'Reilly
2. SQLGetDiagRec question
3. "service name is not valid": problems to create a new DB on NT
4. Out of Office AutoReply: Deja.Com Daily Summary: comp.databases.o racle.server 1/1
5. "Cursor state not valid.", AS400 JDBC, IBM JTOpen 3.0
6. HELP!!! Need ODBC Connect String for VB 5.0
7. ERROR: "The key is not valid"
8. SQL2K Migration: Problem
9. "ORA-01843: not a valid month"
10. "Not a valid Password!"
11. "ORA-01843: not a valid month"
12. "Cursor state not valid.", AS400 JDBC, IBM JTOpen 3.0
13. max of ("...","...","..")