Deleting a table data from adminer,It is showing error unable to "unable to open database file"..But command line sqlite3 delete query is working in ubuntu.

Member Avatar
+0 forum 0

Is there are an easier way of serializing a vector attribute of an object in c++ using sqlite3?

Member Avatar
Member Avatar
+0 forum 2

I can serialize an object if it's class definition has attributes. So if I have an object whose class does not have attributes, do I serialize the attributes importedi in it's class definition? For example; suppose I have the following class, #ifndef BREAD_H #define BREAD_H #include "EGGS.h"; #include "FLOUR.h"; class BREAD { public: BREAD();~BREAD(); //lame example std::vector<string> selectIngredient(std::vector<FLOUR>grocery); }; #endif How would I go about serializing attributes defined in the FLOUR.h class if incase I have to? Thanks in advance.

Member Avatar
Member Avatar
+0 forum 2

Hello, The reason why im asking for this is becouse im currently making a project that needs data storage. And sqlite seems to be perfect for that matter. I've already read the documentation of Sqlite3 but i found that insufficient. It didn't really explain much besides the obvious. I can really use some tutorials that explain me everything. Especially the callback funciton which seems to be really important. In a nutshell i need to be able to get data from the database and store it in variables. Any advice would be highly apriciated. Thanks in advance,

Member Avatar
Member Avatar
+0 forum 14

Hi am kinda new in python programing. I have this game that involves a user inputs a value , say color it iterates over imported modules( in this case color) and prints data about it. The problem is that i cant get to code the best way to iterate over teh modules. Here is the code: import games # games package has all modules to be used. The modules include color, food etc GAMES = ('color', 'food', 'car', 'toy') while True: question = input('Please enter your question: ').lower() if not question: break for g in GAMES: if g in question: …

Member Avatar
Member Avatar
+0 forum 2

This python script prints all the columns of an sqlite database which path is given as argument.

Member Avatar
+4 forum 0

Is there a pythonistic way available to search all the tables and columns of an Sqlite3 database? The only inputs would be the name of the sqlite DB file or a raw input. I am trying to write a forensics tool and want to search sqlite files for a specific string.

Member Avatar
Member Avatar
+0 forum 2

I'm trying to represent my data using a bar graph, the data being displayed is goodVotes, neutralVotes and badVotes on the x-axis for each of my pieces of data (records in an sqlite3 database). I wish the "bookName" of each record to be displayed on the x axis of the BAR GRAPH along with it's corresponding good, neutral and bad votes. Then the bars to be displayed depending on the amoun of votes they have. I want sizing to be (width) to be based on screen size (i have a screenWidth and screenHeight variable already set up) as i have …

Member Avatar
Member Avatar
+0 forum 2

HI, I created an app to add a clinc details to the sqlite3 db from xcode. the code is below. The (sqlite3_step(statement1) == SQLITE_DONE) does not execute it. I dont get an error or anything. I can't figure out what exactly is wrong.Apprecite if someone can tell me what i am doing wrong here. Appreciate a response. Thansk, [appDelegate createOpenDB]; sqlite3_stmt *statement1; const char *dbpath1 = [appDelegate.databasePath UTF8String]; if (sqlite3_open(dbpath1, &influenzaDB) == SQLITE_OK) { NSLog(@"Sqlite open true"); //NSLog(@"Statement %@" , statement); NSString *insertSQL1 = [NSString stringWithFormat:@"INSERT INTO CLINIC(CLINICID, CLINICNAME, STARTDATE, ADDRESS, CITY, STATE, ZIP, PASSWORD) VALUES (\"%@\", \"%@\", \"%@\",\"%@\", \"%@\", …

Member Avatar
Member Avatar
+0 forum 1

Sorry, I posted this in software development not python. How do i make an auto-incrementing column? Heres my pseudocode/sql attempt c.execute('''CREATE TABLE <tableName> ( <columnName> <auto incrementing??!!>, <columnName2> text, <columnName3> text, <columnName4> text ) ''')

Member Avatar
Member Avatar
+0 forum 4

How do i make an auto-incrementing column? Heres my pseudocode/sql attempt How do you make an auto-incrementing ID for a record c.execute('''CREATE TABLE <tableName> ( <columnName> <aut incrementing??!!>, <columnName2> text, <columnName3> text, <columnName4> text ) ''')

Member Avatar
Member Avatar
+0 forum 1

I'm starting my Computing project and am using Python linked via sqlite3 to a database. As part of my project I shall be searching for maths books in the database via name or module etc. I wish to display the results on a GUI in python so need to set variables to the results depending on the amount of results. I assume an list with a for loop setting each value in the list as a id of a book and then retrieving data via the id would work but I don't know how to set the results as the …

Member Avatar
Member Avatar
+0 forum 1

I have a very small sqlite3 database with one row consisting of three columns but I can get the page to display the row to save my life. So far all I've been able to get the page to display is the first column of the one row that's in my DB using querySingle and echo `$result`. `$entry` doesn't seem to be doing anything neither does the bottomw while loop. Any ideas. All I want to do here is display the one row that's in my DB to the screen. <?php echo "<html>"; echo "<body>"; // get variable from html …

Member Avatar
Member Avatar
-1 forum 3

I have a program that takes csv values, parses the content and inserts it in an sqlite3 database. I am using sqlite3 to save on space and to make the py scripts a little more portable. The next refactoring may well need to have postgresql or mysql to deal with the long-term inventory-detail. This is a Qualys security report munger, but it is basically the same as a inventory/sales app. We have customers (the hosts and their IP address and OS) -- MHosts inventory (Qualys QID for each vulnerability) -- QIDs A) invoices (The curent test from Qualys) -- Title_Block …

Member Avatar
+0 forum 0

I want to create sqlite3 databases from within a python script. I am currently running this code which does not pass the right variable content to the sqlite3 command prompt, so I have one issue there. I also do not want to have the user have an sqlite3 command shell open. I just want to define the db, and have the tables created and populated later by the py script. I don't want to use a default sqlite3 db for this application, because I want to be able to save instances related to specific data sets. import csv import sqlite3 …

Member Avatar
Member Avatar
+0 forum 3

I have 2 functions, one of which works and one of which doesn't. I do not understand this, because the only difference is that the second function puts in just the name of the variable, where the 1st function puts in the value. There is only one line to build for the test from a given dataset, but the content function has several lines. I am using a for loop to handle the iteration through the csv to get content, but it fails to get anything but the first line. There is no error traceback from this code, unless I …

Member Avatar
Member Avatar
+0 forum 2

Explore Python's sqlite3 database module, create, write and read a database file.

Member Avatar
+3 forum 0

Below is a documented code example showing how to use the SQLite3 class to connect and query your database (and check for errors). IMHO using PDO is a better alternative, as this extension uses mixed technology in a non-standard way (objects, arrays and exceptions). If there are any questions let me know.

Member Avatar
+2 forum 0

Hi. I have a problem that I am tearing my hair out to solve. I am trying to transfer tens of thousands of records into a sqlite db using the script below. The script seems to run okay and I can see the db growing as it runs to some 19megs but when I try and view the database it is empty and subsequently reports a size of 2kb! See my rough code below. I am a journalist and not a pro programmer so be gentle.:) Some of the things I have in there like isolation_level and BEGIN TRANSACTION and …

Member Avatar
Member Avatar
+0 forum 5

A bit of background: I've been working on a python script to do some calculations on a land use model. Basically, I take amount of space developed in the future and pull out a table that has the amount of space by geographic area within the larger area. I load that table, as well as some other tables with information about the types of growth into a sqlite database using python. Then I try to run a query against the data that creates a view of the data assembled and ready to run calculations on. I can review the tables; …

Member Avatar
Member Avatar
+0 forum 2

Hi, I can connect to an energy-meter (Baudrate 300!) and the logfile with 228 lines comes slowly in.[code=Python]line = ser.readline(eol='!') print line [/code] If I use the above code, the complete logfiles is shown. And if I parse separatly saved logfiles with match, it sorts out the right values into sqlite. So both "parts" work separatly. But my script is not capable of handing over the output to parse it. It does'nt throw an error, only that 0 values were given. What am I missing? First I thought, the script is to fast for the slow input (takes over a …

Member Avatar
+0 forum 0

Hi everyone. I'm using sqlite3 in Linux and I currently have a problem. I have a database and 2 tables in it: db1 and db2. db1 has 3 columns: empID, empName, empAddr. db2 has just 1 column: empID and its value is set to 0 by default. I created a C program that continuously polls the 2nd database db2 for any changes in the value of empID. Depending on the new value of empID in db2, the program fetches the corresponding info from db1. For example, if the value of empID in db2 is changed to 1, the program looks …

Member Avatar
Member Avatar
+0 forum 7

The End.