This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20479|Reply: 0

[Source] C# uses Oracle database to execute multiple query statements, not stored procedure methods

[Copy link]
Posted on 8/16/2016 10:16:20 AM | | |

Our method of executing multiple SQL queries when using MS Sql Server database in C#:

select * from table1;

select * from table2;

This is very convenient to write, but it is not possible to write like this in Oracle.


C# method for accessing an Oracle database to execute multiple query statements:

You need to add a reference: Oracle.DataAccess.Client, which can be downloaded from Oracle's official website.

It is recommended to put the two files, OraOps11w.dll and Oracle.DataAccess.dll, in the program startup directory, and be sure to ensure that the versions of these two files are the same.

Here is the core code:






Previous:Oracle uses parsing functions row_number efficient pagination
Next:.NET Oracle multi-table query method, a stupid method.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com