Connection with Oracle

bill_carson
Member Posts: 8
Hello! Could anybody help me?
I need to get some data from Oracle table. I create ADO connection through OraOLEDB provider with this code:
'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.
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.
0
Comments
-
Try reading this thread, I think it contains the solution to your problem:
http://www.navision.net/forum/topic.asp?TOPIC_ID=8011&SearchTerms=adoNelson Alberto0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions