database

why do .net Database unit tests using TransactionScope and MSDTC fail ?

We have some unit tests running against a SQL server 2000 database using the DatabaseTestFixture (http://softwaredevscott.spaces.live.com/blog/cns!1A9E939F7373F3B7!155.entry ) class which uses a TransactionScope that is not commited and therefore all changes are rolled back. The tests ran against a local database with no problem. ...

Renamed Database in CakePHP

Hi all, After I uploaded my application created using cakephp, I found out that I had to rename the database. I renamed my database accordingly and changed the settings in the database.php file in the "config" folder. But my application is still not running. I am being shown this error message "Missing Database table" "Error: Database...

How can I get the field names of a database table?

How can I get the field names of an MS Access database table? Is there an SQL query I can use, or is there C# code to do this? ...

Winform and Database development

The company I work for(as a Solo Dev) is a simple, non-profit org. The majority of the apps I have worked on so far and the majority in the queue are glorified Database front ends. To be honest, half of them could be "Jimmy-rigged" to work in Access. I am not an Access developer though and would prefer not to be. What I am looking ...

Does a ResultSet load all data into memory or only when requested?

I have a .jsp page where I have a GUI table that displays records from an Oracle database. This table allows typical pagination behaviour, such as "FIRST", "NEXT", "PREVIOUS" and "LAST". The records are obtained from a Java ResultSet object that is returned from executing a SQL statement. This ResultSet might be very big, so my questio...

Typed Datasets: a Good choice or Bad - Why one should use or not use Typed datasets in their applications ?

Ever since .net 2.0 release this question has been discussed over a large number of times. Many of the developers are not in favour of Typed datasets and there are few who use them practically. The goal of the question is to identify the reasons why one should use or not use Typed datasets in their applications. In my case, I personall...

What tools are available to document a legacy database schema (PDF, DOC, HTML, RTF)

I need to document a legacy database schema for a new employee and as there's no design document I'd like to generate one from the existing schema. As the tables are MyISAM the foregin key relationships won't produce a nice graph. I'm interested in producing a document showing the important tables, their columns, types and remarks. Are ...

How to connect to Oracle 10g from remote client?

Using the standard Delphi dbexpress dbexpora.dll + oci.dll (10g) (the oracle instantclient is installed). When directly on the Oracle Database box we can run dbexpress apps just fine. The local dbxconnections.ini alias used in that case simply specifies our DB service name ORCL as the "database" parameter. We are trying to connect to t...

Java problem: Need a sorted JList to represent a database table

I've found a sample for a sorted JList, but my application is powered by an embedded H2 database so I'm wondering if there isn't a better way to implement this with that in mind. Especially considering the table in question could become enormously large, and duplicating all that data in a JList's list model seems to kinda defeat the poi...

Google Alerts API?

It seems that there is no Google Alerts API. Firstly, How would you get Google Alerts information into a database other than to parse the text of the email message that Google sends you? If you must parse text, how would you go about parsing out the relevant pieces of the email message? ...

What is "really huge" for a DB?

TB hard drives are available for the desktop and it's getting hard to remember what the order of the SI prefixes being used are. It occurs to me that I really have no idea what kid of scale is considered how big. I'm looking for a yardstick to compare them to. So, what is a really huge DB now days? What is the best measure; GB of data? m...

Can I optimize this PHP Script further for Generating a Dynamic Nav from MySQL Database?

I'm working on a new CMS to use on repeative projects. Basically this chunk of code connects to a server, grabs all the names of the tables and uses them to generate a simple navigation. It works pretty great for what I need however I'm just wondering if maybe I can optimize this code sniplet even more and make it even more simple. Ma...

How can I restore SQL Server 2000 from corrupted backup files?

I am using SQL Server 2000. I have a corrupted backup file. How can I restore the database from that corrupted backup file? Any help or suggestions really appreciated. ...

More efficient of the two queries?

I have a table with columns user_id, email, default. Default stores 'Y' or 'N' depending if the email is the users default email. Each user can have only one default email. When a user is doing an update or insert on the table, in my SP I check if the user has passed isDefault as 'Y'. If so, I need to update all the entries for that us...

How to alter a primary key in an SQL Server 2005 database without losing any data?

I have one table in my database that has a primary key and its data type is varchar(10) but it stores only 5 char, so I want to change its data type from varchar(10) to varchar(5) without losing any data. Currently I'm creating a temp table, moving data from the original table to the temp table, then altering it, and lastly restoring th...

Generating SQL upgrade scripts for the customer

What is the best way to maintain upgrade scripts between versions of a product? If a customer starts with version 3 of your product and goes to version 5, what is the best way to generate an upgrade script for the customer so that any differences in the database schema between versions 3 and 5 are resolved? ...

Deleting a record in a table which has foreign key relational tables

Hi guys i am new to database my question is how to delete a records in a table which has foreign key relation suppose i have a 2 tables employee & department which has deptID as relation now i want to delete a specific row in a table like "delete from department where depID=10" its ok if the employees in the department are deleted and i...

Importing wikipedia database dumb - kills navicat - anyone got any ideas?

Ok guys I've downloaded the wikipedia xml dump and its a whopping 12 GB of data :\ for one table and I wanted to import it into mysql databse on my localhost - however its a humongous file 12GB and obviously navicats taking its sweet time in importing it or its more likely its hanged :(. Is there a way to include this dump or atleast pa...

Data corruption in PostgreSQL timestamp field

I have a PostgreSQL table with the following schema - CREATE TABLE test ( id serial NOT NULL PRIMARY KEY, username varchar(100) NOT NULL, -- The user name dob timestamp with time zone NOT NULL -- The date of birth ); I then inserted some data into the table with data like this - INSERT INTO "test" ("username", "dob") VALUES (E'...

How much of a page is occupied by nvarchar(X)?

What are the storage requirements for nvarchar(X)? So for example, if the value in a column is much smaller than X, how much is actually stored in the database page? ...