Questions tagged [data-access]

Data access typically refers to software and activities related to storing, retrieving, or acting on data housed in a database or other repository.

Data Access is simply the authorization you have to access different data files. Data access can help distinguish the abilities of Administrators and users. E.g. Admins may be able to remove, edit and add data, while a general user may not be able as they don’t have the access to that particular file.

327 questions
6
votes
3 answers

Reading parts of large files from drive

I'm working with large files in C# (can be up to 20%-40% of available memory) and I will only need small parts of the files to be loaded into memory at a time (like 1-2% of the file). I was thinking that using a FileStream would be the best option,…
joe_coolish
  • 7,201
  • 13
  • 64
  • 111
5
votes
5 answers

Most Efficient Way To Get A Row Of Data From DB In ASP.NET

I'm writing a method to return an 'asset' row from the database. It contains strings, ints and a byte array (this could be an image/movie/document). Now for most row access I use the following method which returns a NameValueCollection as it is a…
CountZero
  • 6,171
  • 3
  • 46
  • 59
5
votes
0 answers

Translating PersistenceException to DataAccessException in Spring with EclipseLinkJpaDialect

Hallo. I have the same issue explained here The main difference is that I use EclipseLink as JpaProvider. So I configured my entityManagerFactory as below:
Massimo Ugues
  • 4,373
  • 8
  • 43
  • 56
5
votes
2 answers

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…
ColinD
  • 108,630
  • 30
  • 201
  • 202
5
votes
2 answers

Android data access design patterns: Content provider vs repository

I wonder what folks use as a common data access pattern on Android? Content providers? Repositories? DAOs? Thanks a lot!
TheMadMax
  • 83
  • 5
5
votes
1 answer

Opening .gdb database files

I'm trying to open an old interbase .gdb file. This is a new step for me and i don't know where to start any advice would be a great help, I've been searching the internet for the past few days now and i still have to idea how to do so.
Leo Elvin Lee
  • 189
  • 1
  • 6
  • 16
5
votes
3 answers

Error "ORA-00933: SQL command not properly ended" on Select with ODBC Command

I'm trying to execute a query against an Oracle DB using ODBC in .NET and am getting the following error: ORA-00933: SQL command not properly ended However, the SQL statement is definitely correct, and I can execute it successfully from Oracle SQL…
Mun
  • 14,098
  • 11
  • 59
  • 83
5
votes
5 answers

Split data access class into reader and writer or combine them?

This might be on the "discussy" side, but I would really like to hear your view on this. Previously I have often written data access classes that handled both reading and writing, which often led to poor naming, like FooIoHandler etc. The rule of…
Erik Öjebo
  • 10,821
  • 4
  • 54
  • 75
5
votes
2 answers

Best way to get a single value from a DataTable?

I have a number of static classes that contain tables like this: using System; using System.Data; using System.Globalization; public static class TableFoo { private static readonly DataTable ItemTable; static TableFoo() { …
Piers Myers
  • 10,611
  • 6
  • 46
  • 61
5
votes
3 answers

Overly accessible and incredibly resource hungry relationships between business objects. How can I fix this?

Firstly, This might seem like a long question. I don't think it is... The code is just an overview of what I'm currently doing. It doesn't feel right, so I am looking for constructive criticism and warnings for pitfalls and suggestions of what I can…
Mike
  • 1,532
  • 3
  • 21
  • 45
5
votes
1 answer

WCF SOA: CRUD Data Access Service...why bother (or is our design wrong)?

We have a Data Access service in our SOA WCF system. This service is responsible for doing CRUD (create, update, delete) operations on "system wide" database tables, and is also the source of this data for queries. Any other service in the system…
MrLane
  • 1,728
  • 22
  • 41
5
votes
2 answers

Oracle.Dataaccess error ORA-06502: PL/SQL: numeric or value error: character string buffer too small

I am invoking a stored proc from .NET app. The proc returns an out parameter of type Varchar2. To fet ch the out parameter I am passing the parameter to the command as OracleParameter: parm12 = new OracleParameter("testkey" …
moejoe11
  • 885
  • 3
  • 11
  • 14
5
votes
3 answers

How to fix "The provider is not compatible with the version of Oracle client"?

We're using the Oracle.DataAccess.dll assembly version 2.102.2.20 (32 bit). I deployed our Web API application to IIS and tried openning and closing a connection: private static void CheckConnectionUsingOracleClient(string connection) { …
The Light
  • 26,341
  • 62
  • 176
  • 258
5
votes
3 answers

Resources for code generation of database objects

I am working a project where I need to generate a series of classes to represent/access data in the database. Third party projects such as hibernate or subsonic are not an option. I am new in this subject domain, so I am looking for information on…
wusher
  • 12,291
  • 22
  • 72
  • 95
5
votes
8 answers

Controlling access to an internal collection in c# - Pattern required

This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After the items are…
Mats
  • 14,902
  • 33
  • 78
  • 110
1 2
3
21 22