from VB thrue ADOBC to Navision Financials

hi, i made a connection from Visual basic 6.0 thrue ADODB connection fo Navision Financials 2.06. Everything works perfect except when a value is between 0 an 1 the connection just return 0 When the value is 1.1 there is no problem but when the value is 0.9 it returns 0. Do any of you have the same experience with such faults and what are the possible solutions? tnx Tom Delchambre

Maybe check out the options on the ODBC Driver tab for the Navision ODBC driver

Hi Tom, Sounds like you might be mixing integers and decimal variables/field types (Currency/double in VB). Can you explain in a little more detail exactly what you are trying to do? Check the Navision variable or table field type you are storing the value to and ensure it is compatible with the data derived from the ADODB record set. This is for SQL, don’t know about Navision’s proprietary tables. Hope this helps, Bill

hi , In navision it is a decimal and in VB it is a float. Normally it works fine because if it is 1.1 in navision i get a 1.1 in VB. I only have problem with decimals smaller than 1. If it is eg 0.9 in navision it returns in VB as a 0. The options in the odbc only handle cache , dbms cache, time out, read only identifiers, option field types and tmp path i don’t think this would change this problem, because for decimals bigger than 1 there is no problem. could this be an error in the odbc driver? Tom

Not sure Tom. I haven’t seen this with any of the ADO code that we write. As long as the field types are fully compatible, should work without a problem. We’ve worked with ADO 2.1-2.6 back and forth with many database types including old Clipper/Apollo tables, Access, automation via Word and Excel, and MS-SQL. Bill

hi, I did a mailmerge from navision with the c/odbc version and i found the the numbers are passed as 1,00000 or 2,10000 but a 0.5 and 0.1 are passed as ,50000 and ,10000 That seems to be my problem! VB seems to have a problem with that. Now i understand the problem much better, which is the bigger part of the solution :-)) Thanks Tom

VB (i know about VB5) have huge problem with grouping and decimal separator symbols. Check regional settings and set grouping symbol as “,” and decimal separator as “.” in “Number” and “Currency” pages. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia