Options

Connection with Oracle

bill_carsonbill_carson Member Posts: 8
edited 2004-07-20 in Navision Financials
Hello! Could anybody help me?
I need to get some data from Oracle table. I create ADO connection through OraOLEDB provider with this code:
CN.ConnectionString :='Provider=OraOLEDB.Oracle;';
CN.ConnectionString := CN.ConnectionString + 'Data Source=XXXXX;';
CN.ConnectionString := CN.ConnectionString + 'User Id=XXXXX;Password=XXXXX';
CN.Open();

RS.ActiveConnection := CN;
RS.CursorType(3);
RS.LockType(3);
RS.Open('SELECT * FROM SomeTable');

'SomeTable' has several text fields and 2 decimal fields in Oracle. I try to get data from table with RS.Fields.Item('DecimalField').Value, i get an error that Navision do not understand such type of field. When i get field's type with RS.Fields.Item('DecimalField').Type, i see that type is 'adVarNumeric'-'Variable width exact numeric with signed scale'. This type is not supported by Navision. How i can convert this type to simple Decimal? With Navision operators i think it's not possible, because an error occurs then i just try to get data from ADO recordset. I tryed such SQL statement: 'SELECT CAST(DecimalField AS NUMERIC(6,2)) FROM SomeTable' but it doesn't work :<

Thank you.

Comments

Sign In or Register to comment.