By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

ADODB recordset numeric value issue

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.