ADO and AS400 
Author Message
 ADO and AS400

Hi there,

I'm trying to connect to an AS400 Database using the
proper ODBC driver for Windows.

I succeeded in connecting to it and making SQL queries.

The problem I have is that when for example I send a
SELECT command, the returning recordset seems to lose some
data.

I have this example in mind:

FIELD         DESCRIPTION

DOCO          # Workorders
LITM          Product number

In this example, I use the following recordset:

dim oRs as ADODB.Recordset

...

? oRs!DOCO    --> Returns a valid information
? oRs!LITM    --> Returns this "??????" instead of "05390"

Why do I get question marks instead of valid data ???

Can it be an ODBC configuration or a recordset problem ?

thanks



Mon, 06 Sep 2004 22:02:56 GMT  
 ADO and AS400
One thought (a complete guess, actually) is that the driver may be returning
EBCDIC rather than ASCII, and that the question marks are just VB's way of
showing illegal characters. You might check the driver's options to see if
there's an EBCDIC->ASCII conversion flag you have to set.


Quote:
> Hi there,

> I'm trying to connect to an AS400 Database using the
> proper ODBC driver for Windows.

> I succeeded in connecting to it and making SQL queries.

> The problem I have is that when for example I send a
> SELECT command, the returning recordset seems to lose some
> data.

> I have this example in mind:

> FIELD         DESCRIPTION

> DOCO          # Workorders
> LITM          Product number

> In this example, I use the following recordset:

> dim oRs as ADODB.Recordset

> ...

> ? oRs!DOCO    --> Returns a valid information
> ? oRs!LITM    --> Returns this "??????" instead of "05390"

> Why do I get question marks instead of valid data ???

> Can it be an ODBC configuration or a recordset problem ?

> thanks



Tue, 07 Sep 2004 00:13:21 GMT  
 ADO and AS400
This makes sense but why would I have a couple of fields
with valid data in it while the others are question marks ?

But I'll also verify in the ODBC driver if there is such
configuration ....

Quote:
>-----Original Message-----
>One thought (a complete guess, actually) is that the

driver may be returning
Quote:
>EBCDIC rather than ASCII, and that the question marks are
just VB's way of
>showing illegal characters. You might check the driver's
options to see if
>there's an EBCDIC->ASCII conversion flag you have to set.



>> Hi there,

>> I'm trying to connect to an AS400 Database using the
>> proper ODBC driver for Windows.

>> I succeeded in connecting to it and making SQL queries.

>> The problem I have is that when for example I send a
>> SELECT command, the returning recordset seems to lose
some
>> data.

>> I have this example in mind:

>> FIELD         DESCRIPTION

>> DOCO          # Workorders
>> LITM          Product number

>> In this example, I use the following recordset:

>> dim oRs as ADODB.Recordset

>> ...

>> ? oRs!DOCO    --> Returns a valid information
>> ? oRs!LITM    --> Returns this "??????" instead
of "05390"

>> Why do I get question marks instead of valid data ???

>> Can it be an ODBC configuration or a recordset problem ?

>> thanks

>.



Tue, 07 Sep 2004 00:32:25 GMT  
 ADO and AS400
Because numeric fields would be the same on both systems. There's no such
thing as EBCDIC binary. Also, EBCDIC and ASCII overlap some characters. If I
remember correctly, the digit characters 0-9 are the same in both sets.


Quote:
> This makes sense but why would I have a couple of fields
> with valid data in it while the others are question marks ?

> But I'll also verify in the ODBC driver if there is such
> configuration ....

> >-----Original Message-----
> >One thought (a complete guess, actually) is that the
> driver may be returning
> >EBCDIC rather than ASCII, and that the question marks are
> just VB's way of
> >showing illegal characters. You might check the driver's
> options to see if
> >there's an EBCDIC->ASCII conversion flag you have to set.



> >> Hi there,

> >> I'm trying to connect to an AS400 Database using the
> >> proper ODBC driver for Windows.

> >> I succeeded in connecting to it and making SQL queries.

> >> The problem I have is that when for example I send a
> >> SELECT command, the returning recordset seems to lose
> some
> >> data.

> >> I have this example in mind:

> >> FIELD         DESCRIPTION

> >> DOCO          # Workorders
> >> LITM          Product number

> >> In this example, I use the following recordset:

> >> dim oRs as ADODB.Recordset

> >> ...

> >> ? oRs!DOCO    --> Returns a valid information
> >> ? oRs!LITM    --> Returns this "??????" instead
> of "05390"

> >> Why do I get question marks instead of valid data ???

> >> Can it be an ODBC configuration or a recordset problem ?

> >> thanks

> >.



Tue, 07 Sep 2004 00:41:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ADO and AS400

2. ADO and AS400...need help please...

3. to DELETE an empty table gives me a error..(Ado and AS400)

4. ADO and AS400

5. ADO and AS400

6. Help!! ADO to AS400 creates a Read only recordset

7. Importing data from an IBM AS400 using the new ADO.NET

8. ADO AS400 Connection

9. AS400 ADO Connection

10. AS400 and ADO

11. AS400 and ADO

12. ADO recordset with AS400

 

 
Powered by phpBB® Forum Software