data-access

Getting RefCursor and VarChar outputs from the same Stored Procedure

♀尐吖头ヾ 提交于 2019-12-12 22:22:41
问题 I am new to Oracle, so please be gentle... I am querying an existing Oracle DB using C# and ODP11 in .NET 4. All procedures up to this point have been, well, painful to figure out at first, but mostly "just worked" once i figured what i was doing... this one is a different story... I have a stored proc that takes 4 parameters: 2 inputs and 2 outputs... the 2 inputs are grand. one of the outputs is a Varchar2 and the other is a refcursor. I am using an OracleDataReader to run the query, like i

What's the point of ORM If I have to define every field in app.config for Oracle .net Entity Framework

做~自己de王妃 提交于 2019-12-12 12:13:38
问题 To my knowledge, the whole point of Entity framework is to simplify and unify data access models. I downloaded latest Oracle's .net tools (ODAC 11.2 Release 4) which claims EF4 support, and I'm trying to import some Oracle stored procedure (through function import) that has one ref cursor as output param. When I read the documentation on Oracle's site It says that I have to define each field returned by the ref cursor in my app.config. Well. That's extremely stupid and makes the whole Entity

Linq to DataTable without enumerating fields

南笙酒味 提交于 2019-12-11 09:03:06
问题 i´m trying to query a DataTable object without specifying the fields, like this : var linqdata = from ItemA in ItemData.AsEnumerable() select ItemA but the returning type is System.Data.EnumerableRowCollection<System.Data.DataRow> and I need the following returning type System.Data.EnumerableRowCollection<<object,object>> (like the standard anonymous type) Any idea? Thanks 回答1: If I understand you correctly, you'd like to get a collection of objects that you don't need to define in your code

return multiple result sets from ms access to ado.net

别来无恙 提交于 2019-12-11 07:29:49
问题 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 problems. perhaps access does not support multiple result sets? i have not worked much with access. please help. below is my code for reference: System.Data

LDAP lookup using ODP.NET, Managed Driver Beta (Oracle.ManagedDataAccess.dll) fails in C# application

六眼飞鱼酱① 提交于 2019-12-11 04:37:11
问题 I'm using ODP.NET, Managed Driver Beta (Oracle.ManagedDataAccess.dll) in my C# application to access an Oracle database. This is to replace using the native version of ODP.NET in order to remove all the local dependencies on Oracle Client 10g/11g/etc. so that this needn't have to be installed locally. This is a solution I found here. This is my C# code: new OracleConnection("Data Source=ABCDEFG1;User Id=myuserid;Password=mypassword;").Open(); This line is reached and the OracleConnection

How to use SQL Command Builder and SQL Data Apdater

人盡茶涼 提交于 2019-12-11 04:27:44
问题 I read SQL Command Builder class from http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommandbuilder.aspx and I found that I can show update done on dataset/database using select and update command. SQL Command Builder concept is clear if I am using single dataset but what if I want to use two different dataset? Scenario: I am reading values from database into one dataset ds1; which is assign to sql adapter and sql command builder. Now, I am reading only selected values from

DAL/BLL and Client/Server: Should the client use BLL or DAL objects for presentation? Or maybe another layer (data transfer object?)

﹥>﹥吖頭↗ 提交于 2019-12-10 23:05:52
问题 I'm writing a client/server system. The server has a DAL/BLL design. The client is responsible for presenting the data objects and providing dialogs and wizard to allow the user to update these objects (i.e. adding/editing a user). Initially I thought I'll just make the DAL objects have a universal data provider object so they can be used by the client as well as the server. For instance, when the data object is being used by the server, the database is the data provider; when the data object

What is a good approach for a Data Access Layer?

让人想犯罪 __ 提交于 2019-12-10 11:38:22
问题 Our software is a customized Human Resource Management System (HRMS) using ASP.NET with Oracle as the database and now we are actually moving to make it a product that supports multiple tenants with their own databases. Our options: Use NHibernate to support Multiple databases and use of OO. But we concern related to NHibernate learning curve and any problem we faced. Make a generalized DAL which will continue working with Oracle using stored procedures and use tools to convert it to other

Silverlight data access

纵饮孤独 提交于 2019-12-07 15:55:47
问题 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 bit over 3000 records, which calls for about 4 calls to the web service at 2 seconds a piece. Needless to say, it's slower than I'd want it to be. I currently have these

Why switch from ADO to ADO.NET?

て烟熏妆下的殇ゞ 提交于 2019-12-07 11:43:37
问题 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 still has to be written The new options of Dataset , BindingSource and TableAdapter seem confusing the same code is written programatically access the Database, all