I am trying to read data stored in pervasive sql server from an application in c# and my code in c# is like this:
daBVData = new Pervasive.Data.SqlClient.PsqlDataAdapter("SELECT NUMBER,RECNO,SHD_DESCRIPTION,BVUNITPRICE FROM SALES_HISTORY_DETAIL", cnBVData);
I get the correct values for non numeric fields (like strings) but for numeric field the select statement returns values which are wrong, eg:
returns 9000001.20520 instead of 12052
or returns 9000000.14523 instead of 1452.31
PCC is the Pervasive Control Center. It can execute queries and view data. ODBC Test is a Microsoft utility for executing queries against an ODBC Data source.
What I was suggesting would be to run your query through the PCC to see if the data is correct there. If it is, there might be a problem with the code or provider. If the data is incorrect in PCC, the problem might be in the DDFs and you'd need to talk to the vendor or developer that created the DDFs for the data files.
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.