database

Data cache on filesystem, C#

Hi, In a software (client-server arch.) I would like to create a cache in local filesystem for some data received over network. (they are marked as DataContract and Serializable). The data can be modified by other users so must be syncronized. In a few words: I need something like Outlook's *.ost files for Exchange. What is the best p...

online database storage - traffic

Hi guys i started a small business yahoo account for storing data in mysql database with the use of php scripts. the users will save text information in the mysql tables probably a user will store 100kb information in the tables. I should have more than 1000 registered users in the first month. Could anyone tell me if it is ok to use ya...

Handling DB error in PHP

Hey everyone! I'm building a webapp in PHP that uses a MySql DB. What I want to do is for example when someone tries to access to a page, but the DB throws an error, to display a HTML (or redirect) page with the HTTP code 500. Something like the "fail whale" in Twitter. Is that possible? ...

XML error at ampersand (&)

I have a php file which prints an xml based on a MySql db. I get an error every time at exactly the point where there is an & sign. Here is some php: $query = mysql_query($sql); $_xmlrows = ''; while ($row = mysql_fetch_array($query)) { $_xmlrows .= xmlrowtemplate($row); } function xmlrowtemplate($dbrow){ return "<AD> ...

How to unit test Database Class

This has probably been asked many times but here it goes : I have a class full of db connections open connection query db read values close connection How should I unit test this stuff? Do I need to create a fake database? I guess I could mock the MySql classes (for c#), but that's also a lot of work. Some of the statements are "I...

Smallest database that supports indexes, high write volumes, and is ACID?

I don't really care if it's NoSQL or SQL based - as long as it uses int indexes (and stores them in RAM for fast searching) so I can find my data with simple queries based on criteria like user_id, lat, status, or other common int fields. The actual records can be stored on disk. My first guess would be SQLite - but it moves slowly when...

importing ofstream to sqlite db

Hi, Right now, in my c++ code, I am writing my ofstream to an output xls file. I also want to direct it to a sqlite database from my c++ code. Is there anyway for doing this? ...

use parameter when populating a struct with dataset c#?

Hi! I have a struct in a web service in c#. When I use "Selet * from TABLE1"; in a WebMethod I get a fully populated struct. But when I add a WHERE clause, I get null in response. Why is this? I have searched everywhere for a simple explanation but haven't found one. How can I use a SELECT * FROM TABLE1 WHERE _id=" + id "'"; If I only ...

How to tell if Oracle Streams is installed?

Hi, I am just setting up a test project using Oracle Streams. My first problem is, is there something I need to install first? How can I tell if Oracle Streams is installed ? ...

programmatically delete a widget on home screen by click listener in android

Hi I've a widget which i would like to delete programmatically if the user gives the command by clicking on some button or so.. But as per my knowledge the app programme and the widget programme will be running in different processes. So how is it possible to get the controll of another process remote view and delete the same clearing al...

Pythonic Boolean Conversion

I'm writing a module to act on data being sent to a database from Python. Since boolean is not a SQL datatype, those values have to be converted to some pre-defined value. I decided while defining the tables that I would use 'T' and 'F' in a varchar(1) field as my Boolean stand in. In attempting to make this conversion while being pro...

How to change id in existing MySQL tables with data to autoincrement from last highest id?

I have just managed to migrate a pretty big database from SQL Server to MySQL. I didn't set the primary keys to auto increment during the migration because the tables have relationships based on ids as primary keys which are foreign keys in another table. Now for adding new records I want to alter the primary key 'id' columns in all tab...

mysql and php - export specific row

Hello I have a test table with name mytable and with following data id name surname ================== 1 sotos val 2 john rik 3 peter ask How can id export for example the second row in mysql using php knowing the id? ...

Could I please get some help correcting my little beginners project ?

Hi, This is my first time posting something like this. I'm a complete n00b at programming/php. I was trying to grasp all the tutorials out there and wanted to create a sort of framework to base projects off of for web db/applications. I came up with a few files for crud operations that I know must really be horrible code. I was wondering...

Android - How to sort list

I have a list that i fill with data from a database, and now i want to sort this data by title and date. Im still new to programming for Android, so cant figure out how to do this here, hope someone can help. Here is how the list is filled: public void fillData() { // get all the data from database DBAdapter db = new DBAda...

Seed data for an American English dictionary.

I want to find seed data to load into my dictionary. I just need the word's orthographic representation (letters) and the definition. I'm looking for a single text file that contains this information to parse and then load into my db. I'm using rails so if there is a gem or plugin that can do this that would be nice if any knows about ...

Structuring a recipe database

I'm working on building a database that will search for recipes by ingredients. For example, I think I plan on populating the database with types of ingredients that are accepted, but I don't want to have to parse the string which includes all the ingredients in a particular recipe. I was thinking of making just like an list of acceptab...

Deploying Android App.

I have developed a database application for Android. Now I want to make it available to deploy it. But I don't how to deploy it with the database. ...

How to get the OS information and the Databases that are installed on a machine whose IP address known using Java ?

Hi, I am going to create a tool which shows the OS and Databases related information of a machine. I have the IP address/Host Name of a machine. Using the IP Address/Host Name of that machine I want to get the OS and Databases related information. I need the information of databases(Like Oracle, MySQL, SQL Server..) without actually c...

Converting a MySQL query, to a routine which takes parameter

Hi! I'm using VSC++ and MySQL ver.5.2.25 database, I've tested a query In MySQL that is like this: select Name from test.virus where Name LIKE 'b' '%' ORDER BY Name; It works well and return all Names that starts with 'b',I want to use a routine instead of this query, so that I can call the routine from my program. I've tried this...