I'm using DBI to query a SQLite3 database. What I have works, but it doesn't return the columns in order. Example:
Query: select col1, col2, col3, col4 from some_view;
Output:
col3, col2, col1, col4
3, 2, 1, 4
3, 2, 1, 4
3, 2, 1, 4
3, 2, 1, 4
...
(values and columns are just for illustration)
I know this i...
I made a model, and ran python manage.py syncdb. I think that created a table in the db. Then I realized that I had made a column incorrectly, so I changed it, and ran the same command, thinking that it would drop the old table, and add a new one.
Then I went to python manage.py shell, and tried to run .objects.all(), and it failed, say...
Is it possible to use a Mutex Object for a application which users c++ dll to do background work and a c# to display it. Bot these use a common resource ie db . So can Mutex be used to lock this resource. In my db c++ will insert to db and c# will read it.
...
In psuedo-code, this is bascially what I would like to do:
select
if a1 >= 0 and a1 <= 2
a2 + a7 + a8 as sum
else
a2 + a8 as sum
from table_name
;
(The column names, etc. are just for illustration.)
In English: I need to sum different columns for each of a few thousand records. I'd like to do the sum in SQL,...
Hello all,
i am new to this topic.
i want something like this.
i have two tables in my sqliteDatabase one is master and another is child.
Now if i delete a record from master suppose i delete a row from master where id=5, then all the records from the child table whose id = 5 deleted automatically.
I don't know how to create triggers a...
I am looking at a SQLite database owned by a third party process. It appears locked and has a *-journal file. What I don't know, is if the lock is shared or exclusive.
I am hoping to read from the database even though it is currently locked by that other process. I will only ever read from the database.
Currently I fail at this. I get ...
I'm converting an app to use SQL Server 2008 that is currently using SQLite. How would I do the following view in SQL Server 2008? I can't seem to figure out the syntax for calling multiple tables:
CREATE VIEW new_mimetypes AS
SELECT
DISTINCT fd.mimetype AS 'newMimetype'
FROM
files_detail AS fd
WHERE
...
I am trying to load an extension to sqlite3 for use within iPhone application objective-c code. I successfully compiled the c file of new functions into a dylib named libsqlitefunctions.dylib. Here is where I am a bit lost. I call sqlite3_load_extension as follows:
char *error = sqlite3_malloc(MAX_SQLITE_ERROR_MESSAGE_SIZE);
const char ...
Hi,
I try to bind a NSString value into my SQL query but its not working, and I don't know what I'm doing wrong.
Here is my query:
Select * from fiche where fichetype = 'EVENT' and sdate like '?%' ORDER BY cdate DESC
And I'm using this part of code to bind the value:
sqlite3_bind_text(getEventStatement, 1, [value UTF8String], -1, ...
I followed the suggestion here: and the gem seemed to install correctly, but when I ran rake:db:migrate from the windows command line, I got a full on pop up saying:
"This application has failed to start because sqlite3.dll was not found. Re-installing the application may fix this problem"
which is really weird, because normally (when ...
Total newbie here, regarding sqlite, so don't flame too hard :)
I have a table:
index name length L breadth B height H
1 M-1234 10 5 2
2 M-2345 20 10 3
3 ....
How do I put some tabular data (let' say ten x,y values) corresponding to index 1, then another table to index 2, and...
I'm experiencing a very strange issue with string equality in SQLite3. I have a table with a text column named type.
If I run select distinct type, 2 from mytable order by type (the 2 is there to get the pipe separator), I get:
...
Tops|2
...
Tops|2
i.e., the same column appears twice. This is causing me problems because queries wi...
When performing SQL statements such as UPDATE, and INSERT, the usual .fetch*() methods on the Cursor instance obviously don't apply to the number of rows modified.
In the event of executing one of the aforementioned statements, what is the correct way to obtain the corresponding row count in Python, and the corresponding API in the Sqli...
I am able to create a connection to a local sqlite3 database ( Using Mac OS X 10.5 and Python 2.5.1 ) with this:
conn = sqlite3.connect('/db/MyDb')
How can I connect to this database if it is located on a server ( for example on a server running Ubuntu 8.04 with an IP address of 10.7.1.71 ) , and is not stored locally?
e.g. this doe...
I want to provide access an sqlite database in Objective C. I don't want the caller to bother about the DB itself and so I intend to do something like this in my DataStore.m:
#import "DataStore.h"
#import <sqlite3.h>
static sqlite3 *database = nil;
@implementation DataStore
+ (void) initialize {
if(self != [DataStore class])
r...
I need to migrate information that I created in SQLite3 to a MySQL database on my website. The website is on a hosted server. I have remote access to the MySQL database. I initially thought it would be easy, but I am not finding any good info on it, and everything I read seems to imply that you need to dump the SQLite3 file, convert i...
Hi guys,
I'm having a little bit of a problem that I thought was related to Security but, turns out can't be as I did almost everything ...
Plenty of information on this on the web but nothing has an answer to fix the issue.
Let me tell my steps:
Have a Website on VS2k8 that when I debug or start from Cassini, all works fine
When se...
So I'm trying to rough out a design in Ruby, and so I ran
ruby script/generate scaffold item name:string description:text model:string manufacturers_name:string category:string weight:decimal upc:string ebay_cat_id:string blacklist:bool in_discovery:bool archived:bool
The only problem is that none of the bool fields are on the model....
I am developing trading software, front end qdevelop and back end sqlite3. There was a problem
that is when save the record through the application that doesn't store in a database after close the application. I think the problem is in db-journal file. And how could i commit the data from db-journal file to original .db file. Any fix the...
Hi,
I'm an iPhone developer. I'm writing my unit test cases, one of which checks if the app accepts UTF8 strings to be written to a sqlite3 database. I created a test case to generate random UTF8 strings and I can see the ones that fail do so because they contain an apostrophe (') which I need to be accepted.
I'm writing to the databa...