Cast error message when discovering ref cursor parameter from stored proced
We are today using Microsoft's Oracle provider with some code from the old Data Application Block (from MSDN) to discover parameters from the stored procedures. This code uses the OracleCommandBuilder.DeriveParameters to get the parameters from the stored procedure and command.Parameters.CopyTo copies the discovered parameters into the command object.
If I test with a simple function returning a ref cursor I get one parameter with type refCursor and ParameterDirection.OutPut. This is working fine as long we where using Microsoft's Oracle provider. But using Oracle ODP .NET I get the following error message on datadapter.Fill (I fill a dataset with the result from the reference cursor)
Unable to cast object of Type 'Oracle.DataAccess.Client.OracleDataReader' to type 'Oracle.DataAccess.Types.OracleRefCursor.
If I create a ref parameter manualy like this:
OracleParameter myrefCursor = new OracleParameter();
myrefCursor .OracleDbType = OracleDbType.RefCursor;
myrefCursor .ParameterName = "myParameterName";
myrefCursor .Direction = ParameterDirection.ReturnValue;
and add it to the command object this is working OK. So it seems to be a problem with discovering ref cursor parameters from the database, other parameter types is OK.. I have compared the properties of my manual ref cursor parameter with the one discovered from the stored procedure, but I cannot see any difference. (I see the Value property has some values for the discovered one, but I have set this to DBNull.Value without any result)
Any ideas why I get this error code? Is there any other code blocks I can use to discover the parameters? We send in params object[] with the different values into the helper class and the value is added to the parameter. (Se I don't need to set the data type etc for each parameter, I just need to have the correct order of the parameters)
For accuracy's sake, just wanted to let everyone know that this is actually a bug. The correct bug number is 8423178.
Christian
Mark_Williams wrote:
Just to follow-up on this issue...
The bug has been closed as "not a bug" as it seems undocumented behavior was relied upon for this to work in earlier releases.
Note from the documentation on DeriveParameters:
"The output values of derived parameters return as .NET Types by default. To obtain output parameters as provider types, the OracleDbType property of the parameter must be set explicitly by the application to override this default behavior. One quick way to do this is to set the OracleDbType to itself for all output parameters that should be returned as provider types." (emphasis added)
The issue, as you might already know, is that there is no corresponding .NET Framework Type for an Oracle Ref Cursor and the type is, therefore, set to Object. So, explicitly setting the type to OracleDbType.RefCursor should work.
Regards,
Mark
Similar Messages
-
Get error message when trying to launch bridge from CC 64 bit.
Get error message when trying to launch Bridge from Photoshop CC 64 bit. "Cannot complete command because extension cannot be loaded." Need fix. Thanks.
Hi Adobe Bubba,
Please uninstall the software, run the cleaner tool, restart your machine and install again.
Cleaner tool: http://www.adobe.com/support/contact/cscleanertool.html .
Regards,
Romt Sinha -
From an iPhone 5, I receive the following error message when trying to download content from a radio show app: "Alert Could not parse feed." How do I fix?
Since you're using a 3rd party app, suggest contacting the app developer or looking at their support site for help.
-
i get an error message when trying to download apps from the app store. "Safari can not oprn the page because the address is invalid"
You can't use Safari to download iPad apps. Only use iTunes/App Store.
Cheers, Tom -
I get an error message when running a back-up from my Macbook Pro: The backup disk image Macbook.sparsebundle could not be accessed (error-1) and the backup did not complete? What is the issue?
Try Here > http://pondini.org/TM/C12.html
More Info here > http://pondini.org/TM/Time_Capsule.html -
I've been using my LR3 for a few months but this is the first time that I got an error message when I was switching from the Library module to the the Develop module. I have a macbook pro with 500 GB HD. I am currently using 450 GB already. Anyone have an idea how I can fix this. Thank you.
Should we use our telepathy to figure out error message?
-
Error message when copying a music file from PC to BB
I get the following error message when copying a music file. Also I cannot delete any files.
"Cannot copy. The request could not be performed because of an I/O device error."Hello lcoyote and welcome to the BlackBerry Support Community Forums.
Do you get the error on all media files or just one in particular? From where are you trying to delete files?
Is your media card formatted?
If you aren't able to add/remove media, try formatting the card as shown in KB10527
If you currently have photos on the card, try to move them to the computer first as formatting the card will delete all data.
Let me know how you make out
Thanks!
-HMthePirate
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
Receiving error message when printing on a Mac from Reader 10.0.2
I have tried printing several pdf files and received this error message: "Error: pstopdffilter/pstocupsraster failed with err number 13" from an HP Officejet Pro 8500. The problem started yesterday under Reader version 9.4.2, to which I upgraded a few days ago; I further upgraded today to version 10.0.2 to see if that would help. The printer is fine and the documents all print OK when using Apple Preview and Safari. There are no print restrictions on the documents. Any ideas?
Thanks for the reply, but there was no effect from "Reset printing system..." in System Preferences->Print & Fax. In addition, I uninstalled and reinstalled the printer software from disc - also, no effect. I've narrowed the problem down a bit by sucessfully printing to the same printer from Reader installed on another computer on my wireless network, so it does appear not to be a Reader issue. Off now to the HP website, and sorry if I created any unintended distraction to Adobe Forum members.
-
Please help! error message when trying to download pictures from iphone5 to macbook pro
Hello everyone,
lately I have been having some issues when trying to download pictures from my iphone to my iphoto library. Whenever I try to do so this message pops up "The following file could not be imported. The file is in an unrecognized format." Would anyone happen to know why this is happening? I was always able to transfer my pictures from my phone to my laptop before, so I don't know why this is happening now.
Thank you very much to whomever might be able to solve this problem for me!!"The following file could not be imported. The file is in an unrecognized format."
if you look at the error message - is the filename mentioned? What kind of file is it? A JPEG? A video?
Can you import the files from your iPhone with Image Capture? -
I created a DVD in idvd and now when trying to burn to DVD using external burner, I get the error message
"not enough disk space to encode the remaining assets". I am using a brand new blank DVD.
I have read the help info on computer but hasnt proved helpful.
Any suggestions?iDVD requires a fair amount of disk space to carry out the encoding process; depending on your project, you may need to have over 25 GB free space on your startup hard drive. How much free space do you have?
-
Error Message when trying to burn CD from Playlist
Never had this problem before, but when I try to burn a playlist, I get the error message "there is a file whose file is bigger than that of a blank CD. You need to insert a blank DVD." Can anyone tell me what I am doing wrong. Thanks in advance for your help
Thanks for your reply, but that was not the case. I closed out Itunes and and reopened it and the exact same playlist burned with no problem. So it could not have been a file was too large. Again thanks
-
When trying to download from the app store I keep getting an error message saying "this version of OSX 10.10 cannot be installed on this computer"; however, when checking the requirements I have them all.
Specs
Macbook Pro 15 inch
OS X 10.7.5
4GB of memory
>120GB of storage availableMacBook Pro (Mid/Late 2007 or newer) is required. You've not indicated which one you have. If yours is one of these, then http://www.apple.com/support/mac/app-store/contact/
27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2 -
Error message when trying to copy files from memory stick to MacBookPro
Trying to copy files from my memory stick to my MacBookPro and have started to get a crazy error message - "Attempting to copy to the disk Macintosh HD failed. You do not have enough access privileges for this operation."
I've never had a problem before today. Any help will be welcomed!Try this. When the stick is mounted on your desktop, right click "Get Info" and at the bottom choose "ignore ownership on this drive." See if that works.
Bryan -
Error message when attempting to download applications from the Cloud?
Anyone else receive an error message stating the download appears corrupt when attempting to download an application from their Cloud membership?
Hi there,
Install the latest update of Adobe Application Manager from the below link:
http://www.adobe.com/applicationmanagerpatch/
Regards,
Jairaj -
I get error message when I tried to email from ipad2
My outlook accounts have sync,d with my iPad, but when I try and send from iPad I get a message saying server does not recognise account. Any suggestions?
This is more or less self-explanatory. Syncing doesn't rely on your account information being set properly. In fact, chances are you'd not bother synching (since the iPad could just get the mail itself).
You need to verify that you have the proper mail account type (Outlook can connect to POP3, IMAP, and Exchange), the correct username, domain (if using Exchange), and password. You also need to check and see what kind of login your server requires (there are various options), and whether or not a secure connection is required / available.
The error message simply indicates that you've created an account, but configured it such that the server doesn't recognize you.
Maybe you are looking for
-
Trying to change my region from uk to New Zealand but comes up with incomplete pass how can I get round this ?
-
A really stupid question!
I don't know whether my G5 has got the Intel chip or not. Profile says, Machine name.........Powermac G5 Machine model........Powermac 11.2 CPU type.............Power PC G5 (1.1) System Version.......Mac OSX 10.4.4 (8G32a)
-
Dates planning???
My question is 1. I have structured a project 2. Defined dates for project and WBS 3 Defined activities and duration 3. Defined relationships 4. went to planning board and then opted for bottom up scenario and scheduled it .................... the pl
-
Error instsrting in Presentation services
Hai Experts, When i'm trying to start presentation services, i'm getting ' -1' error. Pleasehelp me regarding this.... Thanks & Regards, Chaitanya.P
-
Showing applets depending upon user input in one web page
hi, I have three applets. I want to create a webpage, put three buttons (or other interactions) on it. If button one is clicked, applet one is shown. If button two is clicked, applet two is shown. I want this to happen in one web page only and one ap