database

Moving from a direct db connection per user to using a web-service with pooled connections.

Hi All, I'm working on moving a V.Rich Client from talking direct to the DB with one login per user to talking direct with a WCF service layer. In the new model I'm like the users to authenticate with the middle tier and for the middle tier to us just one account to connect to the database. My problem comes in that the database's tri...

Are bad data issues that common?

I've worked for clients that had a large number of distinct, small to mid-sized projects, each interacting with each other via properly defined interfaces to share data, but not reading and writing to the same database. Each had their own separate database, their own cache, their own file servers/system that they had dedicated access to,...

Storing large prime numbers in a database

This problem struck me as a bit odd. I'm curious how you could represent a list of prime numbers in a database. I do not know of a single datatype that would be able to acuratly and consistently store a large amount of prime numbers. My concern is that when the prime numbers are starting to contain 1000s of digits, that it might be a bit...

Synchronize data between .dbf files and Sql Server 2005

I have a legacy appplication written in delphi. Database is stored in multiple .dbf files . I have to expose some pages in asp.net using SQL server 2005. Now i want to sync both of these databases. How should i proceed.Please suggest. ...

Update last row with data from second to last row

CREATE TABLE Landmark ( Indexc NUMBER Birth DATE Address VARCHAR2(50 BYTE) City VARCHAR2(30 BYTE) State CHAR(2 BYTE) Zip VARCHAR2(15 BYTE) ... Other properties ) ALTER TABLE Landmark ADD ( CONSTRAINT Landmark_PK PRIMARY KEY (Indexc, Birth)); CREATE TABLE MapPoint ( Indexc NUMBER Longitude FLOAT(126)...

Object serialization in PHP issues?

I was wondering if there is any reason to stay away from object serialization in PHP. My use case is for deferred processing. Ex: A mail queue where the mail object would be serialized when a send request is received, stored in a db and unserialized by a scheduled worker script. The alternative is to store all the information that is n...

Adoconnection asks for userid and password when opened Delphi

I am trying to open an ADOConnection component. The database is in MDB format. I use JET to access it. Whenever I use AdoConnection.Open in my code the window pops up and asks for userid and pass. I enter "Admin" for userid and leave password empty, and it works, but I don't want this window to pop up. I tried using AdoConnection.Open('A...

Oracle's Bitmap Index in SQL Server

I've been successfully using bitmap indexes for years in Oracle environment. Now I'm working on a data warehouse project which will be hosted on SQL Server 2005. So far, I was unable to find an answer for bitmap like indexes in SQL Server. Any Ideas? ...

Tracking external changes to a database with LINQ-to-SQL

Is there a way to get SQL Server 2005 to call back to a connected application, such that the connected application will know when a record in a table has had a field modified by another application using the same database? A simple example would be two instances of the same application connecting to the same table in the same database. ...

Creating a database remotely using C#

I'm trying to create a database by remote connecting to a SQL Server Express using Visual Studio 2008. I log onto SQL Server using SQL Authentication. I can do that remotely using SQL Server Management Studio Express no problem by using the following command: CREATE DATABASE dbname ON (NAME='dbname_dat', FILENAME='C:\folder\dbn...

Solid white screen after a simple PHP search query even though there is html

I'm making a very simple search program for my database. When I run the query, if I search for data that I know is there, it returns the info I wanted it to and displays it. If I enter data that I know does not exist, it goes to a solid blank page even though there is html behind it. Why? Any clue? I wish I had a better way to descri...

Best practices on cache implementation

I would need to implement cache, which would need to perform SQL queries and cache results. So, I would love to read something about best practices of doing that; how do properly, staling cache results, checking, etc. Particularly, I would probably benefit from learning how Hibernate is doing that? Or some other good players :-) ...

What's the benefit of using a lot of complex stored procedures

For typical 3-tiered application, I have seen that in many cases they use a lot of complex stored procedures in the database. I cannot quite get the benefit of this approach. In my personal understanding, there are following disadvantages on this approach: Transactions become coarse. Business logic goes into database. Lots of computat...

Regarding ADO.Net

What is the difference between using oledbDataReader and DataAdaptor ? Which one is best to use ? for fetching data from db... ...

Android:Is there a better way to insert and/or update a database entry?

I have a database containing a userId and a note. The user doesn't know if there already is a note in the DB so they write one and click the 'Submit' button. I want to insert this note if there is no note for the userId or update that userId's already existing note: notesDb.open(); boolean updateResult = notesDb.upda...

How should I design this table?

Hi, Because I have a poor memory, I want to write a simple application to store table column information, especially the meaning of table columns. Now I have a problem with my table design. I plan to make the table have the following columns: id, table_name, column_name, data_type, is_pk, meaning But this design can’t express the for...

How do i detect the provider from a user-specified connectionstring?

My application needs to do a certain query against a user-specified connectionstring. The query will need some parameters, so I was thinking of using the DbProviderFactory , in combination with myConnection.GetSchema("DataSourceInformation").Rows[0]["ParameterMarkerFormat"] to find out if I need to use :(Oracle), @(Sql) or ?(OleDb) to s...

Why does JDBC driver pad some blank characterS other a queried field, from an Oracle Database ?

So, here is the code which create the table in an Oracle 10g / UTF-8 database : CREATE TABLE TEST_SEMANTIC ( SEMANTIC_COLBYTE char(2 byte) , SEMANTIC_COLCHAR char(2 char) ); meaning, that I use two differents types of semantic for the two columns, byte and char. I then insert inside the database these corresponding data : insert in...

Sybase Internal Error 30016

Database server is migrated from version 12.5x to version 15.03 Sybase.Data.AseClient version - 1.15.50.0 I am getting below exception when I run few stored procedures through .Net app (using AseClient) Internal Error :30016 Unknown Dataitem Dataitem Stack Trace - at Sybase.Data.AseClient.AseDataReader.CheckResult(Int32 res) ...

Is there a common name in use for an object that gets data from a database?

I'm developing an API for use by one of our vendors to access data in our databases and I need to name my classes. I'm thinking about names such as Retriever, Accessor, and Controller (eg. TimesRetriever, TimesAccessor, TimesController, etc). These classes will provide read only access to data (that I'll be summarizing) in our database...