Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is MDAC2.1 working with Oracle 7.3.4 ?

Re: Is MDAC2.1 working with Oracle 7.3.4 ?

From: K Stahl <BlueSax_at_Unforgetable.com>
Date: Fri, 31 Mar 2000 11:48:24 -0500
Message-ID: <38E4D6D8.2ED99037@Unforgetable.com>


Sheldon Wang wrote:
>
> Thanks very much for your response.
>
> I found the kb article q188574. It appears that my situation is different
> from the case in the article. I do not use stored procedures, no ADO
> command objects are involved.
>
> I just want to use an ADO recordset to insert a number into a NUMBER field
> in a Oracle table (Personal Oracle 7.3.4). The procedures to recreate the
> problem are:
>
> 1. Create a table, MY_TEST, with a field, TEST1 NUMBER(4,2)
> 2. Create a Data Source Name using ODBC adminstrator, mydatabase
> 2. Start a new VB project, set reference to Microsoft ActiveX Data Objects
> 2.1 Libray
> 3. put the following code in the click event of a Command button
>
> Private Sub Command1_Click()
> Dim rs As ADODB.Recordset
> Set rs = New ADODB.Recordset
>
> rs.Open "select * from MY_TEST", _
> "DSN=mydatabase;UID=dba/dba_admin", _
> adOpenDynamic, adLockOptimistic
> rs.AddNew
> rs.Fields("test1").Value = 33.55
> rs.Update
>
> End Sub
>
> 4. Run the VB project, as soon as the rs.Update is executed, the error will
> occur as follows:
>
> Run-time error '-2147217917 (80040e03)'
> [Microsoft][ODBC driver for Oracle][Oracle] ORA-01722: invalid number
>
> I am quite puzzled why this does not work. This works fine with MDAC2.0,
> but not MDAC2.1.
>
> I would appreciate very much any help.

Did you look at the second knowledgebase article. It talks about setting a recordset property to be able to enter decimal numbers.

....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
Received on Fri Mar 31 2000 - 10:48:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US