ADO 2.5, ASA 7.01 Problem with LONG VARCHARS 
Author Message
 ADO 2.5, ASA 7.01 Problem with LONG VARCHARS

I have a table in ASA 7.01 that looks like this

create table DBA.Scripts
(
    ScriptID              varchar(40)                    not null,
    ScriptType          varchar(20),
    Description         varchar(50),
    Script                  long varchar                   not null,
    StartProcedure    varchar(40)                    not null default
'Main',
    ObjectID             varchar(40),
    UsageType          varchar(5),
    primary key (ScriptID)
);

When I try to add a new row via ADO:

   Set conDB = New ADODB.Connection
   conDB.ConnectionString = "DSN=ASA701"
   conDB.Open

   Set rstDB = New ADODB.Recordset
   rstDB.CursorType = adOpenDynamic
   rstDB.LockType = adLockOptimistic
   Call rstDB.Open("DBA.SCRIPTS", conDB, , , adCmdTable)

   rstDB.AddNew
   rstDB.Fields("ScriptID").Value = "RS"
   rstDB.Fields("Script").Value = "RS"
   rstDB.Update

I get an error stating that the "Script" column can't be Null, which it
obviously isn't.  After playing around I changed the datatype from LONG
VARCHAR to VARCHAR(1000) and my program started working.  I need to use LONG
VARCHAR as the text could get very long (larger than the 32K limit on
VARCHARs)

Has anybody else run into this or know how I can make this work?

Thanks
Richard Speiss



Wed, 26 Feb 2003 06:14:10 GMT
 ADO 2.5, ASA 7.01 Problem with LONG VARCHARS

Try the appendchunk method of the field; (and getchunk to get the values out
again).

Jan



Sat, 01 Mar 2003 18:13:14 GMT
 ADO 2.5, ASA 7.01 Problem with LONG VARCHARS

It turns out it was the Cursor Location.  Once I set it to ClientSide then
all db platforms work fine

Richard



Quote:
> Try the appendchunk method of the field; (and getchunk to get the values
out
> again).

> Jan



Sun, 02 Mar 2003 02:26:04 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. ASA 6.0.2 : ODBC-Problems with LONG-VARCHAR variables

2. Oracle 7.01 problem - HELP

3. Problem with Informix Online 7.01

4. progess 8.3A / unixware 7.01 problems

5. Retrieving Long Raw (BLOB) from Oracle using ADO 2.5

6. strange performance-problems after upgrading from ADO 2.5 to ADO 2.6

7. Problem in installing ADO 2.6 onNT 4.0 server having ADO 2.5

8. Any problems Upgrading ADO 2.1 to ADO 2.5?

9. Backup Exec 7.01 and SQL 7SP1

10. Visual Basic 6.0 vs. Visual Dbase 7.01


 
Powered by phpBB® Forum Software