Somebody knows how to implement Oracle Advance Queue from C# using PL/SSQL and ODP.NET?
I can’t find a single example or resource with concrete examples in C# or VB.NET.
Ideally I would like some examples on how the enqueue and dequeue messages with simple types (XMl/string).
Somebody knows how to implement Oracle Advance Queue from C# using PL/SSQL and ODP.NET?
Share
I can’t help you with the best practices, but I can help you with a UDT Queue. Before you deal with the queue, you need to generate custom types from the database into your C# project. Assuming you have Visual Studio and ODP.NET installed, you simply need to connect to the database through the Server Explorer, locate your UDTs, right click and choose “Generate Custom Class…” These classes map directly to your UDTs and are used to store the Dequeued information.
Here is an example of the code you would use to enqueue a message:
It’s a similar process to dequeue:
That’s a “simple” example. I pulled most of that out of Pro ODP.NET for Oracle Database 11g by Ed Zehoo. It’s an excellent book and I strongly recommend it to help you gain a better understanding of the ins and outs of all things OPD.NET. You can buy the eBook here: http://apress.com/book/view/9781430228202. If you enter the coupon code MACWORLDOC, you can get the eBook for $21.00. That offer is only good for the eBook which comes in a password protected PDF format. I hope this helps!