Oracle Number to Navision

PureHeart
Member Posts: 190
Hi To All!
I need your help! i'm trying to read a number field in an oracle table, the field is defined as number(38,12). I can't really understand why when i try to read this field i get an error from navision of unsupported type!
i've tried to message the value but i got the same error!can someone help me please?
Test_Rs.Open(SqlCmd,Test_Con);
Test_Rs.MoveFirst;
MESSAGE(FORMAT(Test_Rs.Fields.Item('NUM').Value)); <- error!!! but it works with text fields!
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
I need your help! i'm trying to read a number field in an oracle table, the field is defined as number(38,12). I can't really understand why when i try to read this field i get an error from navision of unsupported type!
i've tried to message the value but i got the same error!can someone help me please?
Test_Rs.Open(SqlCmd,Test_Con);
Test_Rs.MoveFirst;
MESSAGE(FORMAT(Test_Rs.Fields.Item('NUM').Value)); <- error!!! but it works with text fields!
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=1123
http://www.mibuso.com/dlinfo.asp?FileID=1123
0
Answers
-
PureHeart wrote:Hi To All!
I need your help! i'm trying to read a number field in an oracle table, the field is defined as number(38,12). I can't really understand why when i try to read this field i get an error from navision of unsupported type!
i've tried to message the value but i got the same error!can someone help me please?
Test_Rs.Open(SqlCmd,Test_Con);
Test_Rs.MoveFirst;
MESSAGE(FORMAT(Test_Rs.Fields.Item('NUM').Value)); <- error!!! but it works with text fields!
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
Could you post the exact error message, pls?0 -
Hi Phenno,
the error is this:
"This data type is not supported bt C/SIDE. You can access data from any of the following data types: VT_VOID, VT_I2, VT-I4...."
Can you help me? ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
PureHeart wrote:Hi Phenno,
the error is this:
"This data type is not supported bt C/SIDE. You can access data from any of the following data types: VT_VOID, VT_I2, VT-I4...."
Can you help me? ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
That field is probably not a varchar type?
I've made a function that "translates" "integer value from db" to "integer value in navision".
You could make few functions in that manner that do integers, decimals, etc...// This is in RS loop. You call ReadADOFieldInteger function. NavisionIntegerVar := ReadADOFieldInteger(RS.Fields.Item('Total')); // Here is a function that does translation to Navision Integer ReadADOFieldInteger(adField : Automation "'Microsoft ActiveX Data Objects 2.7 Library'.Field") IntegerValue : Integer // Function has local vars adStream Automation 'Microsoft ActiveX Data Objects 2.7 Library'.Stream // end of local vars CREATE(adStream); adStream.Open; adStream.WriteText(adField.Value); adStream.Position := 0; IF EVALUATE(IntegerValue,adStream.ReadText) THEN ;
I forgot to mention, this works on MSSQL 2000. I haven't tried it on Oracle.0 -
THANK YOU Phenno!!!! I've resolve!!!! IT WORKS!!! THANKS A LOT!Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
=D> This is an excellent solution. Thanks.0
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