Dear Developers! I had got a problem width the dbsetfilter function when i used an mdb file. When i gave an explicit filtercond then haven't any problem, but when i give an variable in a filtercond, then the program generate runtime error message. Two example (sorry, my englis isn't correct).
Example1: #include "adordd.ch" function mdbtest() DbCreate( "test2.mdb;table2", { { "_FIRST", "C", 10, 0 }, { "_LAST", "C", 10, 0 }, { "_Age", "N", 8, 0 } }, "ADORDD" ) HB_AdoSetTable( "table2" ) dbUseArea( .F., "ADORDD", "test2.mdb",, if(.F. .OR. .F., !.F., NIL), .F. ) dbAppend() test2->_First = "Peter" test2->_Last = "Sulyok" test2->_Age = 21 dbAppend() test2->_First = "Monika" test2->_Last = "Matis" test2->_Age = 35 dbsetfilter({||_FIRST=='Monika'},"_FIRST=='Monika'") msginfo(str(reccount())) dbclosearea() return nil The result of msginfo is 1. The program can run. Example 2: #include "adordd.ch" Function mdbtest() local cnev:="Monika" DbCreate( "test2.mdb;table2", { { "_FIRST", "C", 10, 0 }, { "_LAST", "C", 10, 0 }, { "_Age", "N", 8, 0 } }, "ADORDD" ) HB_AdoSetTable( "table2" ) dbUseArea( .F., "ADORDD", "test2.mdb",, if(.F. .OR. .F., !.F., NIL), .F. ) dbAppend() test2->_First = "Peter" test2->_Last = "Sulyok" test2->_Age = 21 dbAppend() test2->_First = "Monika" test2->_Last = "Matis" test2->_Age = 35 dbsetfilter({||_FIRST==cnev},"_FIRST==cnev") msginfo(str(reccount())) dbclosearea() return nil This function generates an error message. Any comments or ideas? How can i correcting the second example to do running? Best regards: Peti
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour