database

PHP's PDO ODBC connection is failing to connect to Intersystems Caché DB

I have the developer version of the Caché DB running locally. When I try to use PDO ODBC to connect to it I just get errors: Connection failed: SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified I've used several DSN statements such as: #$conn = "odbc:host=127.0.0...

Connection to DB2 in Python

Hi, I'm trying to create a database connection in a python script to my DB2 database. When the connection is done I've to run some different SQL statements. I googled the problem and has read the ibm_db API (http://code.google.com/p/ibm-db/wiki/APIs) but just can't seem to get it right. Here is what I got so far: import sys import ge...

ASP MVC Set RadioButton From Database

Hello All, I have what should be an easy question for you today. I have two radio buttons in my view: Sex: <%=Html.RadioButton("Sex", "Male", true)%> Male <%=Html.RadioButton("Sex", "Female", true)%> Female I need to select one based on the value returned from my database. The way I am trying to do it now is: ViewData["Sex"] = data...

ASP.Net Using LINQ SQL as a Counter

Is there a better way to use LINQ to act as a counter each time a button is pressed? Seems like there should be a better way then having a LINQ statement run and get the current value and then an addition statement to insert the old value + 1. ...

What are your thoughts on Raven DB?

What are your thoughts on Raven DB? I see this below my title: The question you're asking appears subjective and is likely to be closed. Please don't do that. I think the question is legit because: Raven DB is brand-spanking-new. RDBMS's are probably the de facto for data persistence for .net developers, which Raven DB is not. Giv...

Hierarchical Hibernate, how many queries are executed?

So I've been dealing with a home brew DB framework that has some seriously flaws, the justification for use being that not using an ORM will save on the number of queries executed. If I'm selecting all possibile records from the top level of a joinable object hierarchy, how many separate calls to the DB will be made when using an ORM (...

Large tables of static data with DBGhost

We are thinking of restructuring our database development and deployment processes by using DBGhost, we want to move away from the central development database and bring the database to the source control. One of the problems we have is a big table with static data (containing translated language strings), it has close to 200K rows. I kn...

What is the best scala-like persistence framework available right now?

What is the best scala-like persistence framework available right now? Hibernate works, but it's not very scala-like. It insists on using annotations, no-arg constructors, doesn't work with anonymous class instances, doesn't work with scala collections, has an outdated string-based query model, etc. I'm looking for something that reall...

Lambda Expressions and Stored Procedures

Hi Everyone. I'm trying to mimic the LINQ Where extension method for my ADO.NET DAL methods. Bascially, my aim is to have a single method that I can call. Such as: Product p = Dal.GetProduct(x => x.ProductId == 32); Product p2 = Dal.GetProduct(x => x.ProductName.Contains("Soap")); I then want to dissect those Predicates and send th...

SQL Server database change workflow best practices

The Background My group has 4 SQL Server Databases: Production UAT Test Dev I work in the Dev environment. When the time comes to promote the objects I've been working on (tables, views, functions, stored procs) I make a request of my manager, who promotes to Test. After testing, she submits a request to an Admin who promotes to UA...

How to improve my software project's speed?

I'm doing a school software project with my class mates in Java. We store the info on a remote db. When we start the application we pull all the information from the database and transform it into objects to use in our application (using java sql statemens). In the application we edit some of these objects and then when we exit the app...

Extract data from CardScan Database using C#

I need to extract data from .CDB (CardScan Database) using C#. How i can do this? Thanks ...

Rails migrate date to string?

Hi Everyone, I have a field in my db table which is a date rather than string, how do I make a migration to convert it to a string? class CreateKases < ActiveRecord::Migration def self.up create_table :kases do |t| t.date :dateclosed Is it even possible? Thanks, Danny ...

How to Link VS2010 Database Project and LINQ to SQL

As I am working with the new database projects in VS2010, and as I am learning LINQ to SQL, I am curious as to the best way to link the two groups of information so that when I update one, the other updates along with it. From my research here at SO, as well as in Google, it appears the general rule of thumb is: "Build the database, and...

PHP front-end and Java back-end for a web app?

I'm designing a web application. I was wondering if it was feasible to design a php front end (using some php framework e.g. CakePHP), which stores and retrieves data to display to the user. Then develop a java backend which listens to the database for changes, and depending on what was changed, performs some actions and updates the da...

The CHOICE : Firebird or H2

Hi, i have to choice a database to use in server-mode for a java desktop application. I think both are great java database. In my opinion (im NOT well-informed): H2 PRO Is java based Develeopment say it is very very fast Easy to install, configure and use with java application H2 CONS Is a young project Reliability doubt for co...

WPF application with MS Access database as a data source

I have a Microsoft Access 2010 database(*). Now, using Visual Studio 2010, I want to create a WPF application and add the database as a data source. The app will have a window with a frame that provides navigation through pages. No problem so far. But: -What is the right way to set up the database in this scenario? Tables only? Or must ...

Accessing global variables within functions in PHP

There are multiple times in one page where I need to connect and subsequently query a MySQL database, yet my code won't let me. I think it might be something to do with how my files are nested but it makes no sense. I am opening the SQL connection in the header file. The top of the offending page looks like the following: <?php $page_t...

Postgre database ignoring created index ?!

I have an Postgre database and a table called my_table. There are 4 columns in that table (id, column1, column2, column3). The id column is primary key, there are no other constrains or indexes on columns. The table has about 200000 rows. I want to print out all rows which has value of column column2 equal(case insensitive) to 'value12'...

NHibernate custom connection string configuration

I have a c# library project, that i configured using nhibernate, and I like people to be able to import this project and use the project. This project has FrontController that does all the work. I have a connection string in hibernate config file and in app.config file of another project. it would be nice for anyone to be able to set t...