data-access

Which Data Acccess layer is the recommended today for ASP.net?

Good day! I'm currently building a small website where I write down problems that arise and answers to them for others to see. Currently I'm using a DAL much like the one described here. Now I have been looking at other models, and in particular linq based models using Linq2SQL and the ADO.net Entries framework. I realize I'm moving the...

How to update and insert with Data Access Application Block and OLEDB

Hello, I can't seem to find any good documentation on this. I want to use the Data Access Application Block with some dbf files and an access database. How do you use the AddInParameter method properly? If you have to use the "?" what is entered into the name parameter of that method? Someone else said that you can use the named paramet...

return multiple result sets from ms access to ado.net

hey guys i want to fetch 3 tables in 1 single ado.net call from my ms access database, however i get an error when i am trying to do that when i change my sql query to just fetch 1 table, my code works fine can anyone let me know how to achieve this with ms access? because i have been doing this with sql server since ages without any p...

Data Access ASP.NET

Hi, I built an online news portal before which is working fine for me but some say the home page is slow a little bit. When I think of it I see a reason why that is. The home page of the site displays Headlines Spot news (sub-headlines Spots with pictures Most read news (as titles) Most commented news (as titles) 5 news titles f...

Data mapping code or reflection code?

Getting data from a database table to an object in code has always seemed like mundane code. There are two ways I have found to do it: 1) have a code generator that reads a database table and creates the class and controller to map the datafields to the class fields or 2) use reflection to take the database field and find it on the cla...

Auto Generate Gets and Sets from a Database

I am coming from VB6 and I am starting to convert an existing VB6 code to VB.Net. What tools can I use to automate this task? ...

Transactions for read-only DB access?

There seem to be very different opinions about using transactions for reading from a database. Quote from the DeveloperWorks article Transaction strategies: Models and strategies overview: Why would you need a transaction if you are only reading data? The answer is that you don't. Starting a transaction to perform a read-only ...

iPhone App Data Access

Is it possible to access the data belonging to the apps that ship with the iPhone? I know we can access the contacts information, but I am interested in being able to read/write/delete to the Notes App documents that a user makes or read/write/delete bookmarks from safari. What applications have data that we can access? Can we access da...

Outer Variable Access in PHP Class

Consider the following situation file: ./include/functions/table-config.php containing: . . $tablePages = 'orweb_pages'; . . file: ./include/classes/uri-resolve.php containing: class URIResolve { . . var $category; . . function process_uri() { ... $this->category = $tablePages; ... } . . } file: ./settings.php containing: . . req...

.NET XmlReader with 'FOR XML' data

Recently, in company we got some MSSQL database from some old project which we have to integrate in current solution. Database has about 100-150 stored procedures that use FOR XML AUTO clause, so that queries return complete object-graph as XML instead of rows. Quickest solution (for us in company) was to create serializable classes (w...

How can I use the dropdownlist to populate/enter data?

Here's my existing code: <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="dsEmployees" DataTextField="Last_First" DataValueField="EmpNum" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList> ...

Can not access the Instance Data of a Singleton class from MBean

I am working against the deadline and i am sweating now. From past few days i have been working on a problem and now its the time to shout out. I have an application (let's call it "APP") and i have a "PerformanceStatistics" MBean written for APP. I also have a Singleton Data class (let's call it "SDATA") which provides some data for th...

Why switch from ADO to ADO.NET?

I have some friends who are 'old-school' VB6 database developers and I was telling them about .NET and its features, specifically ADO.NET. In our conversation, they brought up the following reasons why they would rather stick with ADO than move to ADO.NET: The Dataset is disconnected (What if power fails?) The same amount of code stil...

Where to find a good database (factory) class with connectionpooling?

I found a lot of information about how to make a database factory or how to deal with connection pooling but i nowhere found a complete solution. I have always used my own solutions, but they're not complete i think or could be improved. Are there some good designed classes any of you use that i can find on the net? Thanks ;-) ...

Automatic Data Access Layer

I'm fundamentally sick of writing data access layers. I see it as a boring and pointless endeavour. I envisage a development environment where I can just create my Entities/Models and start building the application. The time taken to write the DAL, procedures, etc... just eats my enthusiasm for a project. What I want is a generic reposi...

How do I name classes that a Repository uses for data access?

I've been programming for many years, recently i've been trying to apply some of the ideas from Domain driven design, but I still struggle with deciding on good names for certain parts of a system. Here's one example; I have a WCF webservice that returns "Computer" objects. The object is an aggregate root that contains child entities. ...

PHP Data Access to Multiple Records

So currently I am using a pattern to grab a data entry (record). It works great for me if I only need to work with one record. However if more than one record is involved it gets more complicated. Here is my base pattern, using a contacts table: class Contacts_Entry { private $_entry = Array('contact_id' => false, ...

Data access, unit testing, dependency injection

Hello all, I've recently got a task to create a simple utility that allows to import data from a file with special format to the database. I've implemented console application with few classes(Program class operates with business logic class, business logic class in turn operates with data access class). Everything works ok, but now I'm...

Different methods of accessing Azure storage

Is there any other method for accessing Azure storage other than using key and account name? ...

Silverlight data access

Hey folks, I'm working on a silverlight reporting tool which draws up all sorts of fancy graphs based on client data. The issue I'm having right now is a good way to get all the data I need from the database to my silverlight app. Sofar I have a web service which chunks up my data into groups of 1000 and ships them back to me. I need a...