473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ADODB recordset numeric value issue

Hello everyone.

I have a ADODB recordset that uses a connection string to connect and
grab data from our mainframe. Had worked great in the past.

Then - I ran the same module the other day and noticed that the
numbers were off. Upon Debug.Print rs(1) value - it was 9.23 but it
should be 2171.31, but it's display as 21.71.

I spun my wheels and finally ran the same module on another machine
and it's fine. So it's specific to my machine.

I checked Regional Settings and didnt find anything odd.
Any suggestions?

Jul 20 '07 #1
8 2612
If it is possible, use an ODBC link to the datatable (dataset - whatever
they call it) on the mainframe and then use DAO code to manipulate the
data. If an ODBC link wont work, then export a dataset from the
mainframe to a textfile. Check to see if any of the data has changed
from the export to the text file. If the data in the text file is the
same as the data on the mainframe then import that text file into Access
and use DAO code to manipulate that data.

If the data changed in the Text file from the Export, then there may be
a problem in your connection to the mainframe, could be hardware, could
be software.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 20 '07 #2
I can't setup an ODBC connection to the data - it's an old mainframe
app.

Additional information, if I use MSQuery to query the information -
the data is fine.

I am thinking it's something withn Access.

-B

On Jul 20, 1:25 pm, Rich P <rpng...@aol.comwrote:
If it is possible, use an ODBC link to the datatable (dataset - whatever
they call it) on the mainframe and then use DAO code to manipulate the
data. If an ODBC link wont work, then export a dataset from the
mainframe to a textfile. Check to see if any of the data has changed
from the export to the text file. If the data in the text file is the
same as the data on the mainframe then import that text file into Access
and use DAO code to manipulate that data.

If the data changed in the Text file from the Export, then there may be
a problem in your connection to the mainframe, could be hardware, could
be software.

Rich

*** Sent via Developersdexhttp://www.developersdex.com***

Jul 20 '07 #3
Additional information -

Seems like the decimal place is being moved to places to the left than
it should be:

example:

2.99 instead of 299.70
..709 insetead of 70.90
21.71 instead of 2171.23

On Jul 20, 1:50 pm, BerkshireGuy <berkshireguy2005-
commeri...@yahoo.comwrote:
I can't setup an ODBC connection to the data - it's an old mainframe
app.

Additional information, if I use MSQuery to query the information -
the data is fine.

I am thinking it's something withn Access.

-B

On Jul 20, 1:25 pm, Rich P <rpng...@aol.comwrote:
If it is possible, use an ODBC link to the datatable (dataset - whatever
they call it) on the mainframe and then use DAO code to manipulate the
data. If an ODBC link wont work, then export a dataset from the
mainframe to a textfile. Check to see if any of the data has changed

from the export to the text file. If the data in the text file is the
same as the data on the mainframe then import that text file into Access
and use DAO code to manipulate that data.
If the data changed in the Text file from the Export, then there may be
a problem in your connection to the mainframe, could be hardware, could
be software.
Rich
*** Sent via Developersdexhttp://www.developersdex.com***- Hide quoted text -

- Show quoted text -

Jul 20 '07 #4
If you can make an OleDB connection to this mainframe (which actually
surprises me since I am aware that mainframes are old technology) then
you can make an ODBC connection (ODBC came before OleDB). If you can't
make an ODBC connection then you can't make an OleDB connection (ADODB)
to that mainframe. If you are making an OleDB connection - it probably
isn't to that mainframe. Most likely, the source that you are
connecting to is the wrong source, but when you use MSQuery, you are
querying the correct source and that may be whey that data is correct.

Mainframes generally create textfiles for their datasets. Any
connections will be to a respective textfile (using Ftp.exe). Your
connection is probably referencing the wrong text file. You could read
up on Ftp.exe and use that to tap into your mainframe and take a look at
the directory structure that your login is set to and browse the various
files.

Ftp.exe comes stock with the windows OS.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 20 '07 #5
Rich - I tired connecting/linking to ODBC and it won't let me for some
reason.

Anyways, the same code in the same database works on a co-workers
system.

So I am thinking it's a bad dll file related to ADO or some odd
registry setting.

-B
On Jul 20, 4:05 pm, Rich P <rpng...@aol.comwrote:
If you can make an OleDB connection to this mainframe (which actually
surprises me since I am aware that mainframes are old technology) then
you can make an ODBC connection (ODBC came before OleDB). If you can't
make an ODBC connection then you can't make an OleDB connection (ADODB)
to that mainframe. If you are making an OleDB connection - it probably
isn't to that mainframe. Most likely, the source that you are
connecting to is the wrong source, but when you use MSQuery, you are
querying the correct source and that may be whey that data is correct.

Mainframes generally create textfiles for their datasets. Any
connections will be to a respective textfile (using Ftp.exe). Your
connection is probably referencing the wrong text file. You could read
up on Ftp.exe and use that to tap into your mainframe and take a look at
the directory structure that your login is set to and browse the various
files.

Ftp.exe comes stock with the windows OS.

Rich

*** Sent via Developersdexhttp://www.developersdex.com***

Jul 20 '07 #6
Just an idea, try a decompile on the MS Access DB. Decompile fixes a
lot of quirky things in Access.
Barry Wright
www.witstoronto.ca

On Jul 20, 4:01 pm, BerkshireGuy <berkshireguy2005-
commeri...@yahoo.comwrote:
Rich - I tired connecting/linking to ODBC and it won't let me for some
reason.

Anyways, the same code in the same database works on a co-workers
system.

So I am thinking it's a bad dll file related to ADO or some odd
registry setting.

-B

On Jul 20, 4:05 pm, Rich P <rpng...@aol.comwrote:
If you can make an OleDB connection to this mainframe (which actually
surprises me since I am aware that mainframes are old technology) then
you can make an ODBC connection (ODBC came before OleDB). If you can't
make an ODBC connection then you can't make an OleDB connection (ADODB)
to that mainframe. If you are making an OleDB connection - it probably
isn't to that mainframe. Most likely, the source that you are
connecting to is the wrong source, but when you use MSQuery, you are
querying the correct source and that may be whey that data is correct.
Mainframes generally create textfiles for their datasets. Any
connections will be to a respective textfile (using Ftp.exe). Your
connection is probably referencing the wrong text file. You could read
up on Ftp.exe and use that to tap into your mainframe and take a look at
the directory structure that your login is set to and browse the various
files.
Ftp.exe comes stock with the windows OS.
Rich
*** Sent via Developersdexhttp://www.developersdex.com***

Jul 21 '07 #7
I'll try that - but one thing I think people are missing - this code
using the same dB - works fine on other systems.
On Jul 20, 10:26 pm, Barry Edmund Wright
<bwright_msacc...@sympatico.cawrote:
Just an idea, try a decompile on the MS Access DB. Decompile fixes a
lot of quirky things in Access.
Barry Wrightwww.witstoronto.ca

On Jul 20, 4:01 pm, BerkshireGuy <berkshireguy2005-

commeri...@yahoo.comwrote:
Rich - I tired connecting/linking to ODBC and it won't let me for some
reason.
Anyways, the same code in the same database works on a co-workers
system.
So I am thinking it's a bad dll file related to ADO or some odd
registry setting.
-B
On Jul 20, 4:05 pm, Rich P <rpng...@aol.comwrote:
If you can make an OleDB connection to this mainframe (which actually
surprises me since I am aware that mainframes are old technology) then
you can make an ODBC connection (ODBC came before OleDB). If you can't
make an ODBC connection then you can't make an OleDB connection (ADODB)
to that mainframe. If you are making an OleDB connection - it probably
isn't to that mainframe. Most likely, the source that you are
connecting to is the wrong source, but when you use MSQuery, you are
querying the correct source and that may be whey that data is correct.
Mainframes generally create textfiles for their datasets. Any
connections will be to a respective textfile (using Ftp.exe). Your
connection is probably referencing the wrong text file. You could read
up on Ftp.exe and use that to tap into your mainframe and take a look at
the directory structure that your login is set to and browse the various
files.
Ftp.exe comes stock with the windows OS.
Rich
*** Sent via Developersdexhttp://www.developersdex.com**
Jul 21 '07 #8
Barry Edmund Wright <bw**************@sympatico.cawrote in
news:11**********************@g4g2000hsf.googlegro ups.com:
try a decompile on the MS Access DB. Decompile fixes a
lot of quirky things in Access.
Unlikely this will fix a data-related issue, as decompile has an
effect on nothing but the VBA code. A compact can change behaviors
of queries, though, since a compact flags all stored queries to be
recompiled (i.e., re-optimized from current table statistics) the
next time they are run.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: elcc1958 | last post by:
I need to support a VB6 application that will be receiving disconnected ADODB.Recordset from out DotNet solution. Our dotnet solution deals with System.Data.DataTable. I need to populate a...
5
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
0
by: CFW | last post by:
I thought this was going to be easy but I'm missing something . . . I need to open an ADODB recordset using the recordset source for a list box on my for. When my form opens, the list box ADODB...
3
by: Yuk Tang | last post by:
I'm trying to grab the fieldnames and values from a recordset, but I'm getting errors. I have an idea what the error might come from, but I'm not sure how to correct it. I'm connecting to an...
4
by: narutodc | last post by:
Hi, I'm working on an ASP Jscript page run on IIS 5. However i got a very strange problem: The code is like this var rs = getPaymentDetail(pId);//Get the ADODB record set this.paymentId =...
3
by: pooja1982 | last post by:
Hi, I m getting this message after executing the following code <% CALL OPENDATACON DIM RS SET RS=SERVER.CreateObject ("ADODB.RECORDSET") s="select * from dbpassenger order by ref_no" CALL...
0
by: PCroser | last post by:
I have encountered a problem when querying a table. The query passed data into a recordset which should have resulted in many records but has returned EOF. After debugging the code the only...
6
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
6
by: avcitamer | last post by:
We upgraded our system and problem below occured, pleas help me... Windows 2003 server SP1 When I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value was ok (123.32)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.