Last post Mar 10, 2017 06:52 PM by Lannie
Mar 08, 2017 03:48 PM|leecotton|LINK
Hello all, I hope someone can help me. I've got a vb.net project written using visual Studio 2015. Part of the project interacts with an Oracle database, and so uses lots of Oraclecommand, OracleDataReader and so forth. We're having problem with the performance
of the code, especially when it comes to DB interaction. It's been suggested to me that increasing the fetchsize could improve things, and I've seen code examples elsewhere of using this property on these Oracle commands. however, fetchsize does not seem
to be an acceptable property in my code, e.g. it does not come up as a valid value after entering an OracleCommand or so on. does anyone know why this would not be accepted in my code?
Thanks for any help,
Mar 08, 2017 05:21 PM|raju dasa|LINK
FetchSize is a property on OracleDataReader, check this site for code:
Mar 09, 2017 09:30 AM|leecotton|LINK
Thanks for that, but I find it's not working in my project. If I try to use fetchsize on an OracleDataReader (e.g. myodr.fetchsize=1000), then I get the error 'fetchsize' is not a member of 'OracleDataReader'. I don't see why it's not accepting that property.
Mar 09, 2017 09:42 AM|raju dasa|LINK
then I get the error 'fetchsize' is not a member of 'OracleDataReader'.
I think, you need to use Oracle dll but not system.data.
check this site for details:
Mar 09, 2017 09:34 PM|Lannie|LINK
Some ODP.NET features added over time, not supported earlier versions, but supported later.
Are you using Oracle Data Access Components 12cR4?
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html 64 bit
Mar 10, 2017 09:22 AM|leecotton|LINK
Ah, I see. I've just been using "Imports System.Data.OracleClient" to get my Oracle commands. I guess these don't support the fetchsize property. Interesting, I would have thought the these command in Visual Studio 2015 would have this, but I guess not.
I'll try installing the Oracle VS library and see how I get on. Thanks everyone for your help.
Mar 10, 2017 06:47 PM|Lannie|LINK
System.Data.OracleClient was deprecated by Microsoft long time ago.
Mar 10, 2017 06:52 PM|Lannie|LINK
ODP.NET how has
UNMANAGED classic driver ODAC
MANAGED driver, new, ODAC
Managed driver works both 32-bit and 64-bit, and has the Oracle Client built into the DLL. Just have to bring the TNSNAMES.ORA into the /BIN folder with DLL so it know where Oracle resides. But the Managed Driver does not work in FIPS-140 enabled environment.
I have used managed driver for ASP.NET, WPF, and console applications IntraNet environments.
The set up in config and import statements are a different, but the code remains the same for both UNMANAGED and MANAGED.
Reading required of course.