Hi Alexander,

thanx for answering right away. The following commands have led to the wished result.

Best,
   Michael

=== table in DB

CREATE TABLE mytable
(
   id Integer NOT NULL,
   name Char (40) ASCII,
   comment Long ASCII,
   PRIMARY KEY (id)
)

=== code in VB.net

Dim odbcCmdL As Odbc.OdbcCommand
odbcCmdL ... (create instance and connect it to db)
odbcCmdL.CreateParameter()
odbcCmdL.Parameters.Add("@comment", Odbc.OdbcType.NText).Value = "some text"
odbcCmdL.CommandText = "UPDATE mytable SET name = 'John Smith', comment = ? WHERE id = 20"
odbcCmdL.Prepare()
odbcCmdL.ExecuteNonQuery()




Schroeder, Alexander schrieb:

Hello Michael,

please use a prepared statement for the update of the long value,
and supply the value for the LONG ASCII column as parameter,
as  using literals in UPDATE  commands if LONG columns are affected
is not supported.

Regards
Alexander Schr�der
SAP DB, SAP Labs Berlin



-----Original Message-----
From: Michael P. [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 1:48 PM
To: List
Subject: update of long


Hi,

how can I update a column of type Long. I only need unlimited text-comments to be updated, no files - within a Visual Basic.net application. I can't find any hint in the MaxDB documentation. I'm looking forward to your answer.

Best,
   Michael

Details:

CREATE TABLE mytable
(
   id Integer NOT NULL,
   comment Long ASCII,
   PRIMARY KEY (id)
)
INSERT INTO mytable SET id = 20, comment = 'this and that'
UPDATE mytable SET comment = 'this and that 2' WHERE id = 20

The latter sql command leads to the error 'General error;-7032 POS(30) SQL statement not allowed for column of data type LONG'.





--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


Reply via email to