Re: Inserting a LONG through SQL

From: Scott Urman <>
Date: 5 Oct 1994 19:43:56 GMT
Message-ID: <36uvls$>

In article <>, (Scott Prugh) writes:
|> I'm having a problem inserting a LONG datatype through standard SQL. I
|> get a
|> ORA-01704: string literal too long
|> When I insert a field with more than 2000 characters. I am familiar with
|> the set long statement but this doesn't seem to help. Do I have to write
|> PRO*C to do this? This is particularly important for a Powerbuilder app
|> with embedded SQL. Thanks...
|> Scott Prugh

Yup - Pro*C is probably the way to go here. String literals are limited to 2000 characters, as you have found out. Pro*C allows you to use bind variables, so the string is not part of the SQL statement itself. There are external datatypes for these bind variables (LONG and LONG VARCHAR) that support up to the maximum 2 gig that a long can be. More flexible too, since you don't have to reparse the SQL statement just to use a different value. If Powerbuilder lets you specify bind variables, then perhaps that would work for you as well. I don't know Powerbuilder, so I can't answer that one. But I know that Pro*C allows you to do this sort of thing. Received on Wed Oct 05 1994 - 20:43:56 CET

Original text of this message