Re: [sqlite] Help with establishing a connection on NS3 and sqlite DB
On 21 Mar 2017, at 10:58pm, Ausama Majeedwrote: > But, select query returns only the table field headers instead of the > required record in the following code > > string Query = " select ActorId, ActorType from ActorInfo where ID =" + > tempProcess.str() +";"; For debugging purposes, please have your program display the value of sqlSelect (or log it to an error channel, or some such thing) before it tries to execute it. This will allow you to figure out whether you’re getting the right value for ID. However, I suspect that you should worry more that you’re using sqlite3_get_table(). That’s an obsolete call and should not be used for new code. Instead use sqlite3_exec(). Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Help with establishing a connection on NS3 and sqlite DB
Hello guys, I am trying to do a connection between a database created with Sqlite and my application in ns3. the sqlite engine is installed on ubuntu 16.04 machine and the output is enabled with ns3.26. I cann't do a simple select query from ns3, however it working through the terminal. I install sqlite-autoconf-317 as API to deal with the database. the BD is opened successfully in the fallowing code: sqlite3 *db; int rc; char *error = 0; rc = sqlite3_open("/home/mypc/Desktop/ns-3.26/ns-3.26/testDB.db", ); if (rc) { cerr << "Error opening SQLite3 database: " << sqlite3_errmsg(db) << endl << endl; sqlite3_close(db); return 1; } else { cout << "\n Successfully connected to the database \n"; int n = 0; cin >> n; // Print this info cout << GARIComposeAlgo(db, error, n); cout << "\nclose the db\n"; sqlite3_close(db); } But, select query returns only the table field headers instead of the required record in the following code string Query = " select ActorId, ActorType from ActorInfo where ID =" + tempProcess.str() +";"; char **results = NULL; int rows, columns; const char *sqlSelect = Query.c_str(); int rc; rc = sqlite3_get_table(db, sqlSelect, , , , ); if (rc != SQLITE_OK) { cerr << "Error executing SQLite3 query: " << sqlite3_errmsg(db) << endl << endl; sqlite3_free(error); } else { for (int i= 0; i<4; i++) {cout << results[i]<< endl;} } Could anyone advice me what could the problem and how to check it, solve it please. Thanks ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite with Java
On 2017-03-21 21:36, Timothy Stack wrote: > I see that you've got a solution working, but I wanted to mention this > project which is a JDBC driver that can work with a dynamically linked > sqlite library so there shouldn't be anything to recompile: I can confirm that it's possible to dynamically link SQLite in a JDBC driver without any additional problems. I created JDBC driver for SQLite because I was disappointed with the existing drivers. It takes between 30 to 200 person hours to create a JDBC driver for SQLite, depending on your experience and the number of features that you want to support. So perhaps that is also an option. - Matthias ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] RIGHT JOIN! still not supported?
What benefit does a RIGHT JOIN give over a LEFT JOIN? What queries are more natural to write using the first rather than the second? While I can understand arguments based on simple mirror parity, eg we have < so we should have > too, lots of other operations don't have mirror syntax either. -- Darren Duncan On 2017-03-21 8:42 AM, Daniel Kamil Kozar wrote: Seeing how SQLite was created in 2000, it seems like nobody really needed this feature for the last 17 years enough in order to actually implement it. Last I heard, patches are welcome on this mailing list. Don't keep us waiting. Kind regards, Daniel On 20 March 2017 at 21:09, PICCORO McKAY Lenzwrote: i got this Query Error: RIGHT and FULL OUTER JOINs are not currently supported Unable to execute statement still today in 21 ts century? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite with Java
I see that you've got a solution working, but I wanted to mention this project which is a JDBC driver that can work with a dynamically linked sqlite library so there shouldn't be anything to recompile: https://github.com/tstack/SqliteJdbcNG Unfortunately, it hasn't seen updates for a couple years, but I think it still works. thanks, tim stack On Fri, Mar 17, 2017 at 2:35 PM, Sylvain Pointeau < sylvain.point...@gmail.com> wrote: > Dear all, > > I would like to use sqlite from Java, but I am also looking to buy SSE. > however which library would you recommend? how to integrate SSE? > > ps: it would be splendid if you could provide the java libs, similar to the > .net version. > > Best regard, > Sylvain > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Please help to create a connection to SQLite database!
Hello. I develop C# WPF MVVM Prism modular application in MS VS 2015 Professional in Windows 10 OS. My application has Shell project and many Prism Module projects. Also my application contains CommonClassLibrary class library project where I define ConnectionService class that is applicable Prism service. ConnectionService class implements IConnectionService interface which define in CommonClassLibrary class library too. In the application bootstrapper I do (in particularly) the following C#-code: class FcBootstrapper : UnityBootstrapper { . . . . . protected override void ConfigureContainer() { Container.RegisterType(new ContainerControlledLifetimeManager()); base.ConfigureContainer(); } . . . . . } ConnectionService has (in particularly) the following methods: public bool CheckIfDatabaseExists() { if (!Directory.Exists(@"C:UsersMy_Data")) Directory.CreateDirectory(@"C:UsersMy_Data"); if (File.Exists(@"C:UsersMy_DataMy_Database.sqlite")) return true; else return false; } public void CreateDatabase() { SQLiteConnection.CreateFile(@"C:UsersKTM_DataKTM_Flowmeter.sqlite"); } public bool CheckIfTableExists(string tableName) { using (SQLiteConnection connection = new SQLiteConnection("Data Source=C:\Users\KTM_Flowmeter.sqlite;Version=3;")) { connection.Open(); var command = connection.CreateCommand(); command.CommandText = @"SELECT COUNT(*) FROM sqlite_master WHERE name=@TableName"; var p_tableName = command.CreateParameter(); p_tableName.DbType = DbType.String; p_tableName.ParameterName = "TableName"; p_tableName.Value = tableName; command.Parameters.Add(p_tableName); var result = command.ExecuteScalar(); return ((long)result) == 1; } } In Shell project I have ViewModels folder containing ShellViewModel class. In ShellViewModel class constructor I try to execute the following C#-code: public ShellViewModel(IConnectionService connectionService) { . . . . . . . if (!this._connectionService.CheckIfDatabaseExists()) this._connectionService.CreateDatabase(); this._connectionService.CheckIfTableExists("AddedDevices"); . . . . . . . } And when CheckIfDatabaseExists() method is called and its 'Directory.CreateDirectory(@"C:UsersMy_Data");' line is executed then I have the following exception: "System.Windows.Markup.XamlParseException" in PresentationFramework.dll "Settings "Prism.Mvvm.ViewModelLocator.AutoWireViewModel" property has called exception...". If I try to execute 'Directory.CreateDirectory(@"C:UsersMy_Data");' line of code directly in ShellViewModel class constructor then the same error has place. If I change CheckIfDatabaseExists method as the following: public bool CheckIfDatabaseExists() { if (File.Exists(@"My_Database.sqlite")) return true; else return false; } and change CreateDatabase method as public void CreateDatabase() { SQLiteConnection.CreateFile("My_Database.sqlite"); } and call if (!this._connectionService.CheckIfDatabaseExists()) this._connectionService.CreateDatabase(); then if My_Database.sqlite database is not existed ofcourse it is created. But when I after it call CheckIfTableExists method then on 'using (SQLiteConnection connection = new SQLiteConnection("Data Source=My_Database.sqlite;Version=3;"))' line of code I also have "System.Windows.Markup.XamlParseException" in PresentationFramework.dll "Settings "Prism.Mvvm.ViewModelLocator.AutoWireViewModel" property has called exception..." error. What is the reason of this error? Please help. -- С уважением, Евгений Бузин Инженер программист ООО КТМ-Сервис Тел.: +7 846 202 00 65 доб. 151 Факс: +7 846 229 55 52 E-Mail: evgeniy.bu...@ktkprom.com www.ktkprom.ru [1] -- Best regard, Software Engineer Evgeniy Buzin JSC KTM-Service Tel.: +7 846 202 00 65 add 151 Fax: +7 846 229 55 52 E-Mail: evgeniy.bu...@ktkprom.com www.ktkprom.ru [1] Links: -- [1] http://www.ktkprom.ru ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] RIGHT JOIN! still not supported?
Seeing how SQLite was created in 2000, it seems like nobody really needed this feature for the last 17 years enough in order to actually implement it. Last I heard, patches are welcome on this mailing list. Don't keep us waiting. Kind regards, Daniel On 20 March 2017 at 21:09, PICCORO McKAY Lenzwrote: > i got this > > Query Error: RIGHT and FULL OUTER JOINs are not currently supported > Unable to execute statement > > still today in 21 ts century? > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite does not support ARM platform?
What are you smoking? Do you feel good? -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Jens Alfke Sent: martes, 21 de marzo de 2017 2:01 To: SQLite mailing listSubject: Re: [sqlite] SQLite does not support ARM platform? > On Mar 20, 2017, at 3:38 PM, Jaime Stuardo wrote: > > That is why I suspect about SQLite3 to be really multiplatform. Why can my > own C++ program, that is not small, be successfully compiled and then run in > the machine? Why cannot SQLite source code? You’re using a nine-year-old compiler, and targeting an OS that’s been obsolete for years. There’s nothing intrinsically wrong with that (retro computing is cool!), but if something goes wrong you really shouldn’t blame the (up-to-date) software you’re trying to compile. I’m sure if I tried to compile SQLite for a Macintosh SE using a version of Lightspeed C from 1990, I’d have worse problems ;-) —Jens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] No public bug tracker?
On Tue, Mar 21, 2017 at 1:23 AM, Yuriwrote: > On 03/20/2017 17:20, Joshua J. Kugler wrote: > >> >> sqlite.org/src/login shows that I am logged in, but the bug site says I > am not logged in. I am not sure if this is intentional. I assumed it was. It is intentional indeed. SQLite is public domain, but not really OSS in the traditional sense. You report issues on this mailing list, and the SQLite dev will create bugs report in the tracker, but only for those real bugs which are not user-error, or on older versions of SQLite and already fixed, etc... But you'll see that the SQLite dev-team, with Dr Richard Hipp at its head, are very good are picking up real bugs, and fix them in record time most time. FWIW. --DD ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] configure --enable-shared doesn't build shared libraries
On 03/21/2017 07:11 AM, Yuri wrote: Configure file says: > --enable-shared[=PKGS] build shared libraries [default=yes] However, shared library isn't built by default. This command: $ ./configure --enable-shared && gmake doesn't build it either. Are you using the amalgamation tarball or the full sources. Both configure scripts work to build shared libraries on Linux here. If you search for "shared" in the file "config.log", do you find anything interesting? Here, it says: configure:7227: checking whether the gcc linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries configure:8213: result: yes Dan. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users