3 Replies Latest reply: Jun 17, 2011 4:34 PM by gdarling - oracle RSS

    Client 11.2 returns different DefinedSize than 11.1

    868772
      Hi Experts.

      i am accessing an Oracle-Database with ADO (OraOleDB) and having Oracle-Client 11.2 installed.

      rsTable.Fields(MyFldName).DefinedSize returns 40 (Type is adVarWChar) for a field which is defined as NVARCHAR2(20 CHAR)

      If i determine the DefinedSize with the Client-Version 11.1 i get 20.

      Does anybody know why oracle changed the getter of DefinedSize?
        • 1. Re: Client 11.2 returns different DefinedSize than 11.1
          gdarling - oracle
          According to the MSDN, definedsize should be in chars, not bytes.. http://msdn.microsoft.com/en-us/library/ms675824%28v=vs.85%29.aspx

          I know there were some recent fixes to what oraoledb returned there, but don't have the specifics handy. Depending on what patch level you're at, your 11.1 oledb could actually be more current than an 11.2 version, or maybe a fix just hasn't been backported yet to 11.2. You may want to check with the latest patch level of the version you're using, to see what the behavior is there.

          HTH
          Greg
          • 2. Re: Client 11.2 returns different DefinedSize than 11.1
            868772
            Hi Greg,

            thx for your response.
            We could not wait for an oracle fix and changed our applications. They now get the information from the oracle dictionary (SELECT COLUMN_NAME,CHAR_LENGTH,DATA_TYPE FROM user_tab_cols WHERE TABLE_NAME...).
            We have thousands of client installations and our customers could update theire oracle clients to 11.2

            So, this one is answered for me..
            Thanks

            Ronny
            • 3. Re: Client 11.2 returns different DefinedSize than 11.1
              gdarling - oracle
              For whatever it's worth, I tested the following using 11.2.0.2 patch4 , and got '20'.

              Greg
              'create table nt(col1 nvarchar2(20));
              
              set con = createobject("adodb.connection")
              con.open "provider=oraoledb.oracle;data source=orcl11202;user id=scott;password=tiger"
              set rs = createobject("adodb.recordset")
              rs.open "select * from nt",con
              wscript.echo rs.fields(0).definedsize
              Edited by: gdarling on Jun 17, 2011 2:34 PM