Jump to content

Matze

Members
  • Content Count

    10
  • Joined

  • Last visited

  • Days Won

    1

Matze last won the day on January 2 2014

Matze had the most liked content!

Community Reputation

1

About Matze

  • Rank
    Active

LabVIEW Information

  • Version
    LabVIEW 2011
  • Since
    2010
  1. Hello, happy new year! My customer produces thousands of parts within the last weeks and at every part I do about 3 SQL statements. No error untill now. It seems to work perfectly with the updated version of your library! Great work! Regards Matze
  2. I tested it and it works. I made different Statements and every statement has the column names integrated statically and not as a bind parameter.
  3. That sounds great. Is it possible to bind column names like: "INSERT INTO table (?, ?) VALUES (?, ?)"? That would have the advantage that the columns order will not be relevant. But I don't know if this is slower. My 1st column is an Auto increment "id" and so I can't give the value for it with my statement.
  4. Hello, I didn't get any errors untill now. But I'll watch it. One question: What is the most efficient way to do the following SQL statements within a Loop: // Loop Start SELECT a, b, FROM table 1 INSERT INTO table 2 (c, d) VALUES (1, 2) SELECT e, f FROM table 3 INSERT INTO table 4 (g, h) VALUES (3,4) SELECT i FROM table 4 ODER BY a ASC LIMIT 20 DELETE FROM table 4 WHERE j < 5 // Loop End Is there a possibility to have 4 prepared Statements? Untill now I didn't use prepared statements. I only use "Execute SQL.vi" and I made my statement before that step with string functions (format into string). But "Execute SQL.vi" is slow, so I'd like to optimize it. Regards Matze
  5. Hello, wow, I started an interesting discussion when posting about error 1097. I'll try the updated library and will inform you about it. Thank you for the new library! Regards Matze
  6. Hello, I'm using your library and it works fine the most time. I do all SQLite Operation sequentially and not in parallel. But sometimes I get this error: Fehler 1097 bei Knoten zum Aufruf externer Bibliotheken in SQLite.lvlib:Pointer-to-C-String to String.vi->SQLite.lvlib:Connection.lvclass:Prepare.vi:1->SQLite.lvlib:Connection.lvclass:Execute SQL.vi->db_log_data.vi->_Main.viSQL: "SELECT id FROM log_data ORDER BY id ASC LIMIT 1" Mögliche Ursachen: LabVIEW: Es trat ein Ausnahmefehler im externen Code auf, der vom Knoten "Aufruf externer Bibliotheken" aufgerufen wurde. Diese Ausnahme könnte Fehler im Speicher von LabVIEW verursacht haben. Speichern Sie alle Projekte an einem neuen Ort und starten Sie LabVIEW erneut. This error occures not always within the same VI. Sometimes the error occures within a DELETE query, sometime within a SELECT query. The VI works for example 1000 times and then the error occures. After restarting my program it works 700 times and the the error occures. Maybe is a synchonisation problem, but I don't think so, because I only use "Execute SQL" sequentially. Do you have any idea what could cause such an error? Regards Matze
  7. Oh I have news: I had my database folder in my LabVIEW project explorer with activated auto population. So LabVIEW always had access to the database and blocked it sometimes. Now I disabled auto population for this folder and it works. But unexplainable is the fact, that my LabVIEW executable didn't work on other comupters. There I had the pauses and only the LabVIEW runtime is installed there. Now, after disabling the auto population option and rebuilding the executable, it runs on any other PC perfectly. Why has the auto population option any influence on my executable? I searched for days and this simple option caused such behaviour on my computer. Sorry, this topic here is now not the right place for this anymore, but I didn't know that a LabVIEW option could cause such behaviour.
  8. I tried "Execute SQL.vi" and "Execute Single SQL Statement". In these VIs you reset the statements, so I don't need any additional steps, I think. I don't use the SQL transaction statements and I only call the statements one after the other (not in parallel). First I though the indexing of the database will be the problem (database size about 50 MB), but a new, empty database causes the same problem (the project is too big to send it to you). I also tried once the "Prepare.vi" outside the loop and in the loop I'll bind the parameters and called "First Step.vi" and "Finalize.vi". But I can't see any performance advantages. When I disable the "First Step.vi" I did not get any pauses. But in this VI you only call directly the DLL function. I tried to set the DLL path directly in the DLL Node, but no changes. The strange thing is, that sometimes there'll be a "xxx.db-journal" file generated, like there is a locked database. But I hope, the DLL call finishes when the execution is really done and not only queued within the database. But with a delay after every SQL execution the pause still will be present. Only the journal files won't be generated anymore. Also interesting is that the windows cursor will change to a waiting cursor for about 1 second when calling the DLL. If I call standard file i/o VIs the cursor will stay normal. I have no ideas anymore, but I'll do some tests. When I find something I'll tell you.
  9. Hm I'm very sorry. I made a demonstration project and there all works fine. Strange, I'll analyse my VIs. Thank you for your reply. I'm sure it's not a problem of your library.
  10. Hello, your library seems to work well. Thank you! But I've got one problem: When inserting data into the database through producer consumer loops, the producer loop gets paused during the calling of the sqlite execution VI. If I replace your library with the standard file i/o VIs from LabVIEW all works fine without any pause. Is there a solution to get your library work with producer consumer loops or is this not possible because of a dll call? Regards Matze
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.