Liaison to Oracle worked in 10g but not with 11g

The code fails to: cmd1. ExecuteNonQuery())
Registrant:
Impossible to persist distributors to the database. -Problem try inserting the p_DistributorID. - 'OracleDecimal' of type 'Integer' type conversion is not valid.
I tried to change the arrIntsParameter (which is the array of integers I want to insert) in an array of decimal numbers, but I still have the same problem.

Is there another way to do it now? How is it stopped working? The only thing that has changed is the server started using an oracle 11 g driver. The application has not changed.
I may have to join the array of integers and comma delimit them... There could be 20,000 of them - each 5 digits.
Private Function InsertRow(ByVal identifierConstant As String, ByVal strFuncName As String, ByVal strCmdText As String, _
                               ByVal p_strIDParameterName As String, ByVal arrIntsParameter As ArrayList) As Int32
        Dim cmd1 As Oracle.DataAccess.Client.OracleCommand = Nothing
        Dim dbConn As Oracle.DataAccess.Client.OracleConnection = Nothing
        Dim intReturn As Int32
        Dim count As Int32
        Try
            count = arrIntsParameter.Count
            dbConn = DBConnection.GetOracleConnection ' (strFuncName, strCmdText, , count) 

            dbConn.Open()

            ' create a command
            cmd1 = dbConn.CreateCommand
            cmd1.CommandType = CommandType.StoredProcedure
            cmd1.CommandText = strCmdText

            ' To use ArrayBinding, set ArrayBindCount 
            cmd1.ArrayBindCount = count

            Dim ParameterIDs As Integer() = CType(arrIntsParameter.ToArray(GetType(Int32)), Int32())
            Dim identifierConstant s As String() = New String(count - 1) {}
            Dim results As Int32() = New Int32(count - 1) {}

            For i As Integer = 0 To count - 1
                results(i) = 1
                identifierConstants(i) = identifierConstant
            Next

            Dim p_ParameterIDs As New Oracle.DataAccess.Client.OracleParameter(p_strIDParameterName, OracleDbType.Int32)
            p_ParameterIDs.Direction = ParameterDirection.Input
            ' Instead of single values, we pass arrays of values as parameters 
            p_ParameterIDs.Value = ParameterIDs
            cmd1.Parameters.Add(p_ParameterIDs)

            Dim p_identifierConstants As New Oracle.DataAccess.Client.OracleParameter("p_identifierConstant", OracleDbType.Varchar2)
            p_identifierConstants.Direction = ParameterDirection.Input
            ' Instead of single values, we pass arrays of values as parameters 
            p_identifierConstants.Value = identifierConstants
            cmd1.Parameters.Add(p_identifierConstants)

            'Dim p_ReturnValue As New Oracle.DataAccess.Client.OracleParameter("p_ReturnValue", results)
            Dim p_ReturnValue As New Oracle.DataAccess.Client.OracleParameter("p_ReturnValue", OracleDbType.Int32)
            p_ReturnValue.Direction = ParameterDirection.Output
            cmd1.Parameters.Add(p_ReturnValue)

            cmd1.ExecuteNonQuery()

            'p_ReturnValue contains all the success/fail results
            Dim rv As Array = CType(p_ReturnValue.Value, Array)

            For i As Int32 = 0 To rv.Length - 1
                If CInt(rv(i)) <> 1 Then Throw New Exception("One of the return Values from insert row failed.  Perhaps a duplicate entry occured")
            Next
            intReturn = 1

        Catch ex As Exception
            Throw New Exception("Problem trying to insert " & p_strIDParameterName & " . - " & ex.Message)
        Finally
            dbConn.Close()
        End Try

        Return intReturn
    End Function
Published by: Sniipe on July 11, 2012 16:43

I think you have a problem with your p_ReturnValue (ParameterDirection.Output).
Since ODP 11 you must set the OracleDbTypeEx property to wait for him. Type of net worth.
Change your code to:

Dim p_ReturnValue As New Oracle.DataAccess.Client.OracleParameter ("p_ReturnValue", OracleDbType.Int32)
p_ReturnValue.Direction = ParameterDirection.Output
p_ReturnValue.OracleDbTypeEx = OracleDbType.Int32
CMD1. Parameters.Add (p_ReturnValue)

CMD1. ExecuteNonQuery())

And try again.

For more information, read the following blog:
http://oradim.blogspot.de/2009/08/odpnet-VB-and-from-type-to-type-is-not.html

Kind regards

Tags: Database

Similar Questions

  • Work of the Working Group wired, but not with WAG160N wireless

    I have a Vista PC serving a printer shares and give a working group with Vista, XP and OS X machines. The Vista PC is connected to the gateway. They all have the same workgroup name. Features such as printing, hand access and visibility machine works only when the PC client is connected with ethernet cable, not of wireless. On my client Vista, the problem is the same when my IP address is DHCP or static. Any suggestions? It is a quite fundamental problem with wireless connectivity. The gateway is running the version of firmware 1.00.09

    It seems that the problem was with my software firewall of PC server.

    After replacing the WAG160N with another router modem of brand, I still had the problem.

    Disable my firewall deleted the question.

    My firewall appeared to treat differently wired and wireless customers!

    I had to manually enable files and printing, sharing, even if my home network was already defined as approved in the firewall configuration.

  • C6380 works on pc but not with the help of the laptop!

    I have my main PC that is hooked to my wireless-g linksys. Also, I have a laptop that I connect with the router's wireless. I used the instructions delivered with the printer wireless and can print wireless from my pc to the printer. However, I installed the installation cd on my laptop and at halfway through installing it says it cannot find all printers. I tried again and again and don't know what else to do. I can get on my laptop wireless with no problem, I have to install my linksys on the laptop cd?

    Maybe it's that you have a software firewall installed on your laptop that it prevents to find the printer on the network. You can test it to see if this is the problem by temporarily disabling any firewall running on your laptop and see if it suits it. If this difficulty it then re-enable your firewall and configure it to allow UDP port 427 communication (which is what the software uses to find the printer on the network).

    -David

  • Just got 2 of SE. Weather app works on one but not the other.

    Just got 2 of SE. Weather app works on one but not the other. Ideas?

    Drosea,

    Define/describe does not.

    What's the weather App?

  • reCAPTCHA works in IE8, but not in Firefox - missing graphics

    reCAPTCHA works in IE8, but not in Firefox

    All the graphics, the challenge, radio buttons and logo do not appear.

    Make sure that you are not blocking JavaScript.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

    See also:

  • Satellite L40-15B - WiFi works at home but not at school

    My daughter has satellite worked at home and at school: wifi OK, internet OK. The satellite crashed: hard disk failure. Bought a new hard drive.

    I reset the Satellite via the recovery CD. It is now a new clean system with * Windows Vista home premium *. * Wifi works immediately at home. Internet too, but at school with my daughter, the wifi is NOT working anymore.*
    Laptops from other children at school always work with wifi.

    A college of my work told me his sister had exactly the same problem!

    Help!

    Hello

    If the WIFI connection works at home but not at school it has nothing to do with Toshiba. I think that your daughter should ask the administrator of the school what is the problem. Maybe the WLAN requires a certain configuration of TCP/IP or else I n t he know and I think that no one here can answer this question.

    Is that wireless network card is properly installed and works, because you can access the Internet at home.

    Sorry, but everything that s what I can say.

  • Why did the counter works in MAX, but not of Labview?

    Please help, I've been away from Labview for more than 3 months and I'm pretty rusty...

    Last year, I configured successfully NI9401 to measure the period (in seconds) by counting the rising edges of my sensor signal.  Since then, I bought a new PC and loaded all my software inside, including the Labview VI that has worked successfully on the old computer.

    I can see the digital signal using MAX and test for the NI9401 Panel, then, I know that my son and my TTL signal is OK, but nothing except the below error when I try to run the attached VI, happens...  How can I say this VI to search for the signal on channel 14 and MOD3/CTR0?

    Thank you. I'm sure it's a small adjustment... it worked well a few months ago... do not know what the problem is now.

    Thank you

    Dave

    OK, now.  Solved the problem. The vi is fine, but some fragile son have been identified... worked in MAX but not in vi.  Now that the connections have been tightened, it works for both.  Sorry for the inconvenience.

    Dave

  • HP Officejet Pro 8600 Premium: I have a printer HP 8600 pro works fine with my Windows 7 computer, but not with Windows 8.1

    I have a printer HP 8600 pro works great with my computer Windows 7 & computer laptop, but not with my laptop Windows 8.1. When I tried to print wireless (I didn't try connected), it would print only the first pages of 2 or 3 of everything I tried to print. I uninstalled the printer and inserted the CD to try to re - install and I got an error message indicating that the printer does not work with my operating system. I was able to install it earlier, but now, it will not install at all.

    Too bad. I'm sorry. I'm went to the HP Support Web site & downloaded a new driver & now it works!

  • There is an error with my computer, it does not connect with my router. It works with my usb 3g modem, but not with my router. My router works with other devices.

    There is an error with my computer, it does not connect with my router. It works with my usb 3g modem, but not with my router. My router works with other devices.
    I tried to connect my xbox to my computer to xbox live via the 3g router, but I was unable to. According to me, there is something wrong with the network card, since neither the wifi (wlan?) nor the lan connection seem to work.
    I harnessed connected my iPod, Xbox 360 and Nintendo DS for her, but not my computer. Please help me, what wrong with my computer?

    original title: problem with the map?

    Hi GustavTak,

    1. you have made no changes to the computer before the broadcast took place?
    2. do you get an error message?

    Try the steps from the following link:

    Windows wireless and wired network connection problems
    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    Additional information:
    Network connection problems
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-network-connection-problems

    Set up a wireless router
    http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-a-wireless-router

  • Train with webutil works with the browser, but not with webstart JNLP 12 c

    Hello

    I set up forms and reports suite 12 c according to the instructions and I'm testing my forms updated since version 10 g.

    In some forms, I use webutil.

    I can run forms without webutil with the browser or java web start (everything works fine).

    I have problems with the forms use webutil tha, they work very well with the browser, but not with java web start.

    When I run forms with webutil and webstart I see all white and the "crash" application: I must leave because other forms without webutil also do not work.

    Here is my config in formsweb.cfg:

    [Appws] <-start java web

    form = nomeform

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    WebStart = on

    [appnows] <-no java web start

    shape = mercurio

    separateFrame = true

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    What could be the problem?

    Gianpaolo

    Remove Appws:

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    Add frmicons.jar and jacob.jar to $ORACLE_HOME/forms/java/extensions.jnlp.

    and try again.

    Concerning

  • Why my website slider works in Chrome, but not in Internet Explorer

    Why my website slider works in Chrome, but not in Internet Explorer

    On this page it says IE version 10 uses "animation".

    & then if you look at the examples on this page it shows:

    div {}

    -webkit-animation: myfirst 5 s; / * Chrome, Safari, opera * /.

    Animation: myfirst 5 s;

    }

    So, you will need to do.

    Also, check the CSS3 menu on the left, there "transform 2D" then you should find how to join also CSS3 2D transforms

    I have never used myself these animation properties, but these pages will have the info you need.

  • Spry ToolTip works in IE but not Firefox

    Hello

    I do not understand or cannot know what I did wrong. I created a ToolTip for the manufacture of the last product (diameter of 4 inches (special order) brass water revitalizer) on page: http://www.alivewater.net/order.htm

    It works in IE but not Firefox... I can't understand why... can you help me and see what I did wrong?

    Eternally grateful,

    Starry

    The biggest problem I see with the page is that there is no defined document type.  This means browsers have to guess what validation to use to guess what effects should arrive.  If you click on edit->-> category title/encoding Page Properties, you must define the Document Type (DTD).  I.e. once set DW will define the type of document for you.  You can then save and re-upload your document and we can see if the same problem persists.

  • FlvPlayer works with FireFox but not with IE

    Hello

    I created an FLV Player to play remote. FLV movie. It works with Firefox but not with Internet Explorer 6 or 7. In fact, when I test locally on my desktop with local (on my desktop). File FLV movie player works in Internet Explorer. The problem seems to be my Web site, when reading remotely. FLV file, it only works with Firefox.

    Try my Web site with Firefox and IE 6-7 and you will see only works with Firefox. Movie player (right section) to this remote file access: http://www.wikiguitarist.com/wikiguitarist/images/9/9a/CanonFuntwo.flv .

    Since it is a Wikimedia site HTML code is generated from a PHP file. Here is the code that generates the HTML code.

    Of Internet Explorer browser only interpret the tag: < embed >?
    Why IE has problem to play remotely. File FLV and not Firefox?

    Any idea, suggest code, suggest HTLML, action script...?

    Thank you
    Alain



    Hi guys,.

    Thank you very much, Jeckyl, you were right, it seems that only FLASVARS is allowed. Nevertheless, I will try to test if I can pass more than one variable/value less a statement of FLASVARS. For the moment, leaving only a statement of FLASVARS the video works fine with IE and Firefox. I'll do a little cleanup, it is true that my generated HTML code is a bit messy.

    Thanks to WindShadow75 for your answer, now you see it works because I removed the additional declaration of FLASVARS.

    Several guys from tanks, it is appreciated!

    WikiGuitarist

  • Why FP 10 works with firefox but not with IE8

    I down loaded as follows to uninstall PS xp, FP plugin and debug FP of the link in one of your answers. now I can watch YouTube with firefox but not with IE8. You asked me before if I was using 16 bits. What and how do I know? Please help I want to just watch YouTube on IE!

    Hi, Shag, I gave you the instructions that you need, but you keep away from further discussions and lack of messages and your information is scattered. So you don't take the time to read even the threads you started! Nobody has the time to search your information everywhere in the forum, then you did not bother to answer when I answered you. You answered once, but until you take back any use.

    If you are looking for a solution with a single click, you are looking for for a long time.

    Kind regards

    eidnolb

  • All my objects in Indesign are locked. I can move objects with the help of the arrow keys on my keyboard, but not with the mouse. I must have done an order by mistake. Any suggestions?

    All my objects in Indesign are locked. I can move objects with the help of the arrow keys on my keyboard, but not with the mouse. I must have done an order by mistake. Any suggestions?

    Thanks for your help. I work again InDesign brokedown and after a reboot, everything works perfectly fine.

Maybe you are looking for

  • 2 operating systems

    Hello!I have a HP ENVY 17-j004erin the hard drives of laptop 2 - disk 0 and disk 1I have a windows disk 0 8I want to install windows 7 on disk 1, but get an error:https://www.dropbox.com/s/r43rb8gtv7s373x/CameraZOOM-20140924234305997.jpg?DL=0Can you

  • Format HARD drive with windows 8

    Hello, I just formatted HDD with win8 include the recovery partition. I can find a link to download the recovery disc. and cannot find the product key for the operating system. How to install legal win8 to HP?

  • Cannot install the update of security for Windows XP (KB982665)

    Original title: security update/install failures Siena is a re-post using the appropriate format: when I check for Microsoft updates I hit the express tab and most of the time I get the message 'install (s)' didn't like in whne I tried to download an

  • Windows Update does not not IE8/XP error 0X800A0046

    After cleaning my computer from various virus infections and to try a bunch of bugs Windows update no longer works.  I get error 0x800A0046 and have tried every solution I can find on the net including http://support.microsoft.com/kb/883821 all to no

  • ThinkPad improvement / keyboard light

    Recently, I had the chance to work on the T410s and I fell in love with her,and I had an idea of the slight improvement of the lighting of the keypad,would it not possible to implement the letters on the keyboard of engravingin a black light ink and