Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle INSERT into LONG datatype field thru ODBC

Oracle INSERT into LONG datatype field thru ODBC

From: <dgeiser6568_at_my-dejanews.com>
Date: Thu, 19 Nov 1998 21:08:34 GMT
Message-ID: <7321c4$1n1$1@nnrp1.dejanews.com>


Simple question I hope -- for which a simple answer has eluded me...

I'm trying to run an insert statement thru ODBC (in an Active Server Pages application) as follows:

INSERT INTO TABLENAME (ID, TIMESTAMP, DETAIL) VALUES (1, '5:00:00 PM', '<<DETAIL TEXT>>')

In this example, <<DETAIL TEXT>> is actually a text string. Anytime the text string is over 2000 characters in length, an error is returned stating that the value is too large for the column when in fact the DETAIL field is a LONG datatype.

I'm told by the DBA that the value can't be posted as a literal string in the SQL statement - it must be assigned to a variable first. For example in PL/SQL: variable detailtxt varchar2(32700)
BEGIN
detailtxt = '<<TEXT GOES HERE>>'
INSERT INTO TABLENAME (ID, TIMESTAMP, DETAIL) VALUES (1, '5:00:00 PM', :detailtxt)
.
.

I'm not certain that this is the exact syntax of the PL/SQL needed to do this but I think anyone with an answer will get the idea.

Any idea how this can be accomplished with a single SQL string through ODBC? We're using the Microsoft ODBC Driver on IIS 4.0

Thanks...
David T. Geiser
HALO Technologies

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Nov 19 1998 - 15:08:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US