| C:\snml2019\sqlite\sqlite_nms1.txt |
---|
001 | screen.set color red {0} green {0} blue {0} |
002 | screen.text at point {150} {30} string {18、sqlite测试:sqlite.open、sqlite.exec、sqlite.save、sqlite.load} |
003 | var {v_y} value {60} |
004 | |
005 | screen.text at point {10} {~v_y~} string {序号} |
006 | screen.text at point {250} {~v_y~} string {测试内容} |
007 | screen.line from point {10} {75} to point {50} {75} |
008 | screen.line from point {70} {75} to point {630} {75} |
009 | |
010 | var {v_time} value datetime |
011 | var {v_i} value {0} |
012 | |
013 | loop.begin |
014 | |
015 | var {v_i} add number {1} |
016 | var {v_y} add number {18} |
017 | |
018 | sqlite.open {C:\snml2019\sqlite\sqlite_test.db} |
019 | sqlite.log {sqlite测试:v_i=~v_i~} |
020 | sqlite.exec {select * from snml_log} |
021 | |
022 | sqlite.save var {v_time} |
023 | sqlite.exec {select * from snml_var} |
024 | |
025 | sqlite.save var name prefix {sqlite} |
026 | sqlite.load var {v_time} |
027 | sqlite.load var name prefix {sqlite} |
028 | sqlite.close |
029 | screen.text at point {10} {~v_y~} string {~v_i~} |
030 | screen.text at point {70} {~v_y~} string {v_time=~v_time~} |
031 | |
032 | if.var {v_y} > {400} |
033 | loop.exit |
034 | if.end |
035 | loop.end |
036 | run.end |