Accessing oracle7 Long data type with VB3

Accessing oracle7 Long data type with VB3

Post by Jean Ouelle » Thu, 23 Jan 1997 04:00:00



Visual Basic 3 doesn't seem to be able to retreive information
from an Oracle7 LONG data type field. I'm accessing the remote
database in SQLPASSTHROUGH mode.When i create a dynaset using
DS.CreateDynaset("SELECT FLD_LONG FROM TBL_TEST",64) everything
works fine as long as FLD_LONG is a VARCHAR2 data type. All the
correct data is then recover in my dynaset (up to 2000 bytes
witch is the limite of a VARCHAR2 type field). if FLD_LONG is
a LONG data type and the string in the field is less
then 256 bytes, everything works fine also. But when i put
a string longer than 255 bytes in then Oracle7 LONG data field,
the corresponding value in the dynaset becomes #NULL#.

Exemple :

Oracle 7 Table Name : TBL_TEST
Fields in that table :

NAME     TYPE       VALUE

FLD_TMP1 LONG       (X)500
FLD_TMP2 LONG       (X)255
FLD_TMP3 VARCHAR2   (X)2000

DS=DB.CreateDynaset("SELECT FLD_TMP1 FROM TBL_TEST",64)
?DS(0)
#NULL#

DS=DB.CreateDynaset("SELECT FLD_TMP2 FROM TBL_TEST",64)
?DS(0)
XXXXXXXXXXXXXXXXXXXXXXXXXXX (255 TIMES)

DS=DB.CreateDynaset("SELECT FLD_TMP2 FROM TBL_TEST",64)
?DS(0)
XXXXXXXXXXXXXXXXXXXXXXXXXXX (2000 TIMES)

If a attach the Oracle7 table using Access 2.0 and access it using VB,
I'm able to retreive all the information, even
when the data in the LONG data type field is longer than 255 bytes. But
we have to use SQLPASSTHROUGH

The Oracle7 table is on a Windows NT server and i'm using Intersolv's
DataDirect ODBC

Thanks for your help !

Daniel Campeau
S.A.A.Q
Canada


 
 
 

1. VB3, Intersolve ML, 7.3, and Long Data Types

General question first...

There seem to be a collection of complaints about processing Long data
types, and these seem to be aggravated in 7.3.  What kind of workarounds
succeed, and what seems to be the problem with Longs, anyway?

Specific question...

We can update Varchar2s that are 2000 bytes long, but if we try to
updated a Long memo field it says that the record is already in use
(locked).  Environment: VB3, Intersolv ML 2.04, Oracle 7.3, SQL*Net 2.1,
Oracle TCP/IP, NFS 5.1a, Windows 3.1.

Any ideas?

2. Puzzler: Finding median value with SQL?

3. Data Transfer from Long data type to SQL Server Text data type column

4. Repacking dBase files in Delphi

5. Data Type Problem accessing Btrieve (MBF) data type

6. SQL Programmer wanted

7. copy LONG RAW data with Oracle7

8. DLL`s in Foxpro

9. Oracle7 LONG vs. PL/SQL LONG

10. Inserting Data into LONG data type field in an ORACLE Table

11. Inserting Data Into Long Data Type

12. Data Types when using Access Types in VB6

13. HELP!!! SQLBindParameter, Oracle7, VB3.0 Pro