Recordset always return with upper case field names from Oracle 
Author Message
 Recordset always return with upper case field names from Oracle

I am trying to support Oracle 8i in existing VB code.

When querying an Oracle 8i db, the ADO Recordset returned, using ADO 2.6 has
all field names specified in upper case.

eg

SELECT a_field FROM a_table

in vb;

strField = rs.fields("a_field")   'FAILS

strField = rs.fields("A_FIELD")   'works

Also when persisting to XML, all  the field names are in upper case, I have
lots of existing XSL files which look for lower case field names.

I am able to force lower case by using;

SELECT a_field  "a_field" FROM a_table

..but would need to write some kind of parser to convert the sql before
executing - {*filter*} trying to handle every possible SELECT list   ...sum(),
max(), ..etc

I tried creating a new recordset and stepping through each record 'copying'
each field -

 rsNew.addNew  LCase(rsOld.fields(i).Name), rsOld.fields(i).Value

This worked Ok until I tried to do this with a numeric field, when I got an
error -

Duplicate step in action

Anyone have any experience of this ..or any ideas..?

Thanks

Russ



Fri, 06 May 2005 05:47:48 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Converting a Upper Case String to Upper and Lower Case

2. vb6 date variables comparing with access date fields returns always empty recordset

3. Input-field with upper-case chars

4. Change Case (Upper/Lower/Setence/Title CASE)

5. Convert from upper case to mixed case

6. ISO: SQL or CR method for converting upper case text to proper case

7. Change lower case to upper case

8. ODBC Recordset.Updatable Always Returns Read Only

9. ADO Recordset should be returning Rows, but .EOF is always True

10. Password Fields Always Return Nothing ??

11. Proper Case for Name Fields

12. upper case on exit

 

 
Powered by phpBB® Forum Software