1. <small id='83vKE'></small><noframes id='83vKE'>

    <tfoot id='83vKE'></tfoot>
  2. <i id='83vKE'><tr id='83vKE'><dt id='83vKE'><q id='83vKE'><span id='83vKE'><b id='83vKE'><form id='83vKE'><ins id='83vKE'></ins><ul id='83vKE'></ul><sub id='83vKE'></sub></form><legend id='83vKE'></legend><bdo id='83vKE'><pre id='83vKE'><center id='83vKE'></center></pre></bdo></b><th id='83vKE'></th></span></q></dt></tr></i><div id='83vKE'><tfoot id='83vKE'></tfoot><dl id='83vKE'><fieldset id='83vKE'></fieldset></dl></div>

      • <bdo id='83vKE'></bdo><ul id='83vKE'></ul>
      <legend id='83vKE'><style id='83vKE'><dir id='83vKE'><q id='83vKE'></q></dir></style></legend>
    1. sqlite &amp;flex - 如果不存在则插入?

      时间:2023-08-21
    2. <i id='nxCAH'><tr id='nxCAH'><dt id='nxCAH'><q id='nxCAH'><span id='nxCAH'><b id='nxCAH'><form id='nxCAH'><ins id='nxCAH'></ins><ul id='nxCAH'></ul><sub id='nxCAH'></sub></form><legend id='nxCAH'></legend><bdo id='nxCAH'><pre id='nxCAH'><center id='nxCAH'></center></pre></bdo></b><th id='nxCAH'></th></span></q></dt></tr></i><div id='nxCAH'><tfoot id='nxCAH'></tfoot><dl id='nxCAH'><fieldset id='nxCAH'></fieldset></dl></div>

      <small id='nxCAH'></small><noframes id='nxCAH'>

      • <bdo id='nxCAH'></bdo><ul id='nxCAH'></ul>
        <tfoot id='nxCAH'></tfoot>

            <legend id='nxCAH'><style id='nxCAH'><dir id='nxCAH'><q id='nxCAH'></q></dir></style></legend>

                <tbody id='nxCAH'></tbody>

              1. 本文介绍了sqlite &amp;flex - 如果不存在则插入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在使用 flex 开发我的第一个桌面应用程序,并且我也是第一次使用 sqlite.

                I'm using flex to develop my first desktop app and I'm working with sqlite for the first time as well.

                我正在创建我的数据库和所有表,我还想将几行数据添加到几个表中,以便用户在首次安装时可以使用一些数据.

                I'm creating my database and all the tables and I would also like to add a few rows of data into a couple of the tables so that the users have some data to work with on first install.

                我遇到的唯一问题是每次运行程序时它都会一遍又一遍地插入相同的数据.

                The only problem I'm having is every time I run the program it keeps inserting the same data over and over again.

                我只是想知道是否可以执行 - INSERT INTO IF NOT EXISTS.或其他类型的工作.

                I'm just wondering if its possible to do a - INSERT INTO IF NOT EXISTS. or some other kind of work around.

                谢谢!

                推荐答案

                感谢您的洞察力,但我仍然没有任何运气.

                Thanks for the insight but I'm still not having any luck.

                这是我的代码

                stmt.text = "CREATE TABLE IF NOT EXISTS tbl_breed ("+" breed_id INTEGER PRIMARY KEY AUTOINCREMENT, "+"  breed_breed TEXT)";
                stmt.execute();
                stmt.text = "INSERT OR IGNORE INTO tbl_breed (breed_breed)"+" VALUES ('Test')";
                stmt.execute();
                

                好的,我解决了这个问题 - 我猜你必须对主键进行硬编码,这就是我所做的

                Ok so I fixed the problem - I guess you have to hard code primary key here's what i did

                stmt.text = "CREATE TABLE IF NOT EXISTS tbl_breed ("+" breed_id INTEGER PRIMARY KEY AUTOINCREMENT, "+"  breed_breed TEXT)";
                stmt.execute();
                stmt.text = "INSERT OR IGNORE INTO tbl_breed (breed_id,breed_breed)"+" VALUES ('1','test')";
                stmt.execute();
                

                这篇关于sqlite &amp;flex - 如果不存在则插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:使用 Flex 将表单字段保存在 MySQL 数据库中 下一篇:Adobe Air:将 sqlite 的结果 [object Object] 转换为 Stri

                相关文章

                最新文章

                1. <small id='VTk6g'></small><noframes id='VTk6g'>

                    • <bdo id='VTk6g'></bdo><ul id='VTk6g'></ul>

                  1. <i id='VTk6g'><tr id='VTk6g'><dt id='VTk6g'><q id='VTk6g'><span id='VTk6g'><b id='VTk6g'><form id='VTk6g'><ins id='VTk6g'></ins><ul id='VTk6g'></ul><sub id='VTk6g'></sub></form><legend id='VTk6g'></legend><bdo id='VTk6g'><pre id='VTk6g'><center id='VTk6g'></center></pre></bdo></b><th id='VTk6g'></th></span></q></dt></tr></i><div id='VTk6g'><tfoot id='VTk6g'></tfoot><dl id='VTk6g'><fieldset id='VTk6g'></fieldset></dl></div>
                  2. <legend id='VTk6g'><style id='VTk6g'><dir id='VTk6g'><q id='VTk6g'></q></dir></style></legend>
                    <tfoot id='VTk6g'></tfoot>