Spooky "Type Mismatch in Expression" problem 
Author Message
 Spooky "Type Mismatch in Expression" problem

Using delphi 2.0 with Paradox 7 tables
I posted a question about getting  a "Type Mismatch in Expression" error
when trying to assign initial values within the OnNewRecord event of a
TQuery called quCallHdr
eg:  dmData.quCallHdrCHPriority.AsString:= '5';
Rob Tanner suggested:   dmData.quCallHdrCHPriority.AsInteger := 5;
(Thanks), but this made no difference.
I have now moved this initialisation to the OnFormShow event of the next
form - and it works again. This is OK as a workaround (except that it
probably sets the queries' modified property) but I'd be interested in
any ideas why Delphi is getting upset. Especially as a) it used to work
as written, and b) it works when initialising other fields. Suggestions?

Sat, 18 Sep 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Units and "type mismatch" error

2. The keys "-"/"+"/"*"

3. "Syntax Error in expression" strange error

4. Error "Full dBase expressions not allowed"

5. ""256 Color Mouse""

6. mssql uniqueidentifier causes "invalid field type"

7. "word" data type

8. "Invalid field type" exception

9. FP106: Error: Incompatible types: got "BYTE" expected "SHORTSTRING"

10. Q: Problem with "TUpdateSQL"

11. Database Problem: "Not Initialized for Network"

12. "Deadlock" problem with Access


Powered by phpBB® Forum Software