database

Cross-database queries with numbered database name

Hi there, I'm a bit of a novice when it comes to SQL Server 2005. I have a database containing most of the stored procedures and tables (we'll call it 'GrandDatabase'). Each user has its own separate database named after the user's numbered ID. So I have a database list as follows, for example: GrandDatabase 100 101 102 ... I need ...

how to insert data DBGrid to TlistItem with delphi?

hello all Friends.......... how to insert data Db Grid to TlistItem with Delphi? thanks for help????????? ...

Is there a perfomance gain on the language chosen and DB?

Hello all, We have our current system using PHP and Microsoft SQL Server. I am trying to work out if there will be a performance gain in using PHP and MySQL? It will require some effort to change to this platform so I am hoping to find out as much as I can. Are there any questions I should be asking myself to determine the correct cho...

sequence contains more than one element

Hi everyone, I receive the following error "sequence contains more than one element" when trying to populate my promotion table object. I know i recieve this error becuase my query returns multiple values as it should. Can anyone point me in the right direction as to how to delete multiple records besides looping(if possible with EF). ...

Where can i find cities neighborhoods database?

Hey Folks, Where can i find (free/not-free) database of cities neighborhoods for MySQL ? Interested in US only areas. Any recommendations? The database would help to identify location by zipcode. I`ve already got database showing city and state. But i need to find neighborhoods around. I saw good example on site called http://www.ood...

What is causing this propel error?

I'm geting this error in propel when I run my app: PropelException: Unable to open PDO connection [wrapped: SQLSTATE[HY000] [14] unable to open database file] I've tried everything I can think of but can't figure out what is causing the problem. my build.properties is: propel.project = LinkCannon2 # The Propel driver to use for ge...

Efficient way to implement LinkedIn like "How you are connected to" feature?

So LinkedIn has this cool feature in which while visiting some user's profile, linkedin prompts how you are connecting to that user through the network. Assuming that the visitor and the profile owner are two nodes of a graph where the nodes represent users and edge represents friendship, a simple solution could be a bfs starting fr...

What can I do to handle bad behavior from users on a website?

I am working on a project with a group, and we are making an experimental site that involves heavy user interaction. In a nutshell, the nature of the site involves heavy user posting and commenting. Based on the theme of our site, we are expecting to get controversial posts and most likely offensive material. My question is what algori...

jquery: adding value from appended elements to the database

Greetings, I got the following problem: By clicking on the button "Add Flavor" (see full sample code), a dropdown-box, text field and two checkboxes are dynamically generated, - each time the click on the button is performed. Is there a way to add the values from the dynamically generated (actually "appended") elements to the database...

Move Database To Another Folder

How can I relocate database from one folder to another on the same server while the server is running? ...

Efficient algorithm for finding related submissions

I recently launched my humble side project and would like to add a "related submissions" section when viewing a submission. Exactly like what SO is doing here - see right column, titled "Related" Considering that each submission has a title and a set of tags, what is most effective (optimum result), most efficient (fast, memory friendly...

Copy data between two table in sqlite

I have two table with different column like this: table1 ( _id, title, name, number, address ) table2 ( _id, phone, name, address ) How can I copy data 'name', 'address' from table1 to table2. And my question have two situation: First: table1, table2 in the same database file Second: table1 in d...

Why shouldn't I give outsiders access to my database?

Lots of sites today have APIs that allow users to get data from the site as XML or JSON using a GET HTTP request. Flickr and del.icio.us are example of sites with APIs. These APIs require the server to access the database, and then output the result as either XML or JSON. Why do we need this translation though? Why not just create a us...

NHibernate - Multiple Database Mappings in 1 Class

Hey, Sorry if this seems a little crazy but ive been messing around with NHibernate for a while and have come accross a scenario that may not be possible to solve with NHibernate... I have 1 database that contains a load of static data, imagine it like a huge product lookup database, just to point out this is an example scenario, my ac...

How to create a proper database layer?

Currently I use a lot of the ado.net classes (SqlConnection, SqlCommand, SqlDataAdapter etc..) to make calls to our sql server. Is that a bad idea? I mean it works. However I see many articles that use an ORM, nHibernate, subsonic etc.. to connect to SQL. Why are those better? I am just trying to understand why I would need to change thi...

How to speed up query with multiple INNER JOINs

I've been toying around with switching from ms-access files to SQLite files for my simple database needs; for the usual reasons: smaller file size, less overhead, open source, etc. One thing that is preventing me from making the switch is what seems to be a lack of speed in SQLite. For simple SELECT queries, SQLite seems to perform as ...

What is the reasoning behind a connection string in a .Net application being read-only

I have come across this problem before and I have never understood the reasoning for it: in a desktop application developed in .Net the connection string is stored as a read-only value in the application's app config. In every windows application I've written, the database needs to be set by the user: if I'm deploying an application to...

PHP: SQL Prepared statement transaction not working correctly. It's inserting 1 SQL statement, not both.

I'm finding that the PDO Transaction is only commiting 1 of my 2 SQL statement. For some reason, my PHP script is not inserting into my MySQL database 'homes' table BUT it does insert into the 'invoices' table - even though I'm using a PHP PDO database transaction. Code below: $conn_str = DB . ':host=' . DB_HOST . ';dbname=' . DB_NAME;...

uncommitted reads?

I was looking at potential concurrency issues in DB so i went to read up. I found http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/c0005267.htm and it mentions access to uncommitted data. Access to uncommitted data. Application A might update a value in the database, and application B ...

URLs stored in database for Django site

Hi guys, I've produced a few Django sites but up until now I have been mapping individual views and URLs in urls.py. Now I've tried to create a small custom CMS but I'm having trouble with the URLs. I have a database table (SQLite3) which contains code for the pages like a column for header, one for right menu, one for content.... so o...