data-access

Is it really such a bad idea to use webservices to wrap data-access layer?

I am not convinced - I think it might be useful to expose your data to different consumers that can build their front-end apps on top of your webservice. Can someone provide samples of when using web-services to wrap data-access layer is a bad idea? ...

simple jdbc wrapper

To implement data access code in our application we need some framework to wrap around jdbc (ORM is not our choice, because of scalability). The coolest framework I used to work with is Spring-Jdbc. However, the policy of my company is to avoid external dependencies, especially spring, J2EE, etc. So we are thinking about writing own han...

Is this a bug with PHP array accessing?

I ran into this bug where an element of an array, if its index is the string "0", is inaccessible. It's not a bug with unserialize, either, as this occurred in my code without invoking it. $arr = unserialize('a:1:{s:1:"0";i:5;}'); var_dump($arr["0"]); //should be 5, but is NULL var_dump($arr[0]); //maybe this would work? no. NULL ...

What's Up with O(1)?

I have been noticing some very strange usage of O(1) in discussion of algorithms involving hashing and types of search, often in the context of using a dictionary type provided by the language system, or using dictionary or hash-array types used using array-index notation. Basically, O(1) means bounded by a constant time and (typically)...

What object mapper solution would you recommend for .NET?

There are many ORM solutions out there, so in your experiences what seems to be the best choice? NHibernate or Subsonic, Genome,DLinq, LLBLGen - there seems to be a plethora of options, so pros and cons please people. ...

Generic Data Access functions

What is the best way to code the following generic data access functions (ADO.NET, C# or VB, SQLServer or OLEDB) Execute SQL on a connection Open a DataReader Open a DataSet (any ideas on this one?) Such that I can call these functions from anywhere in my program. I'm not interested in Data Access patterns or Data Access layers unle...

Bring the data module to work with --- pass-Store-use a connection inside a reusable data module

I want to seperate the data module of a site into an assembly ( a single dll file ) , What is the best way to get-store and pass the ConnectionString of the site in dealing with the web application . Inside the data assembly I made a static class named ConnectionManager . It has a property named DatabaseConnectionName , that I want to p...

C++ Accessing the Heap

This problem involved me not knowing enough of C++. I am trying to access a specific value that I had placed in the Heap, but I'm unsure of how to access it. In my problem, I had placed a value in a heap from a data member function in an object, and I am trying to access it in another data member function. Problem is I do not know how, a...

Silverlight: Best practices for accessing enterprise data

I am starting to put together a system architecture document for a new project at my company. Basically we have a rather large business layer that follows the enterprise library data pattern, and i will need to access these data objects from a new silverlight application. My question is what is the best way to gain access to these objec...

Setting database and access control permissions

Hi. I am part of a team creating a web application using PHP and MySQL. The application will have multiple users with different roles. The application will also be used in a geographically distributed manner. Accordingly we need to create an access control system that controls user permissions for specific database records i.e. modifi...

Flash server-side Shared Objects - LSOs

The Adobe docs (I can't find which) state that Flash can read Shared Objects (.SOL files?) off a server. This could be an interesting way to store data and retrieve it client-side. Any ideas on how to do this? ...

How to do simple Spring JDBC transactions outside the IoC container?

The project I'm working on uses straight JDBC data access in all its boilerplate glory and doesn't use any transactions. I feel like using transactions and simplifying the way data access methods are written is important, especially with some changes being made currently. The project has been around for quite a while and isn't suited to ...

How to limit user access at database level in Hibernate

The App I need to implement a web app that will be used by different users. Each user has different privileges on various tables, e.g. User A can see fields 'name' and 'address' from the table Student User B can see fields 'name' and 'phone number', but not 'address' from the table Student User C can see and modify all fields me...

Swapping out databases?

It seems like the goal of a lot of ORM tools and custom data access layers (DAO pattern, etc.) is to abstract the database to the point where you could supposedly swap out the entire database system with minimal work. Following the common DAL patterns is usually a good idea in code, but it seems like it would never be minimal work to sw...

Anyone know of a simple WPF/Silverlight data access framework?

Does anyone know of a simple WPF or Silverlight framework which enables you to e.g. define some database tables in e.g. SQL Server compact database and then the framework automatically creates the Window classes etc. which allows a user to login and edit that data? I'm not looking for a complicated MVVM pattern example, it can be hard c...

How to Convert Datareader Result of DbType.Time to Timespan Object ?

I am reading a result from a MS SQL 2008 Database with a column type of dbtype.time from a datareader, using c# with DAAB 4.0 framework. My problem is the MSDN docs say dbtype.time should map to a timespan but the only close constructor for timespan I see accepts a long, and the result returned from the datareader cannot be cast to a lo...

Is it bad practice to run tests on a DB instead of on fake repositories?

I know what the advantages are and i use fake data when i am working with more complex systems. What if I am developing something simple and I can easily set up my environment in a real DB and the data being accessed is so small that the access time is not a factor and I am only running a few tests. Is it still important to create fak...

Code Review: ADO.NET Data Access Utility Class (VB)

When I started at my current employer I inherited a project from a previous developer and in that project was a data access utility class that tries to simplify a lot of the code involved in making calls and retrieving data back from the database. Over time it has been modified to add more overloaded forms of functions, and now I am look...

Help! Flash cannot load XML data from a third-party domain

I am getting news from Yahoo using an RSS feed, using: XML.load("http://finance.yahoo.com/rss/topstories") Yea this is legal and all, and although it works perfectly when my SWF is offline -- it shows a security error, but I allow my D drive "domain" in the Adobe Security Panel. But as soon as I upload it to my server, and test it on...

How to access Cognos PowerPlay Cubes with other applications?

There are Cognos PowerPlay Cubes (Cognos v7.3) which are distributed via Email and then stored on local clients. At the moment, users use MS Access as an interface to access the data and reports in the Cubes. Is there any other tool, application or programming language which allows to access the PowerPlay Cubes and the tables/graphs wit...