Title: Ups. wrong key... S1000: [SAP AG][SQLOD32 DLL][SAPDB]General error;-7002 POS(329) KEY not allowed.

Hi there,

some time ago (02/27/02) I reported an error with columns using "POS" as name.

I worked around by turning the WHERE statements over, for example:

"WHERE Pos<1" is now "WHERE 1>Pos". This works.

Suddenly a error occurs which looksalike to this one:

I open a session using RDO, build a table, insert some data and boing...

Here some snippets (using VB6pro, WinXP, SuSE8, SAPDB 7.3.0.23, MDAC 2.6):

Private Sub Command1_Click()
  '...

  ' open RDO connection
  rdoEnvironments(0).CursorDriver = rdUseOdbc
  connRDO.Connect = sConnect
  connRDO.CursorDriver = rdUseOdbc
  connRDO.EstablishConnection rdDriverNoPrompt
 
  ' create table
  connRDO.Execute _
  "CREATE TABLE Blabla" & _
  "  (" & _
  "    Nr         LONG         NOT NULL," & _
  "    Pos        INT          NOT NULL," & _
  "    UPos       LONG         NOT NULL," & _
  '...
  "    MengeGel   DECIMAL(15,5)," & _
  "    MengeRes   DECIMAL(15,5)," & _
  "  CONSTRAINT BestPos_PKEY PRIMARY KEY (Nr,Pos,UPos)" & _
  "  )"
 
  ' insert data
  connRDO.Execute _
  "INSERT INTO Blabla VALUES" & _
  "  (" & _
  "    '4711'," & _
  "    '2'," & _
  "    '0'," & _
  '...
  "    '0'" & _
  "    '0'" & _
  "  )"

  '...
End Sub

The error happens at the INSERT statement.

"S1000: [SAP AG][SQLOD32 DLL][SAPDB]General error;-7002 POS(329) KEY not allowed."

I have a small VB project zipped and attached (only 2k) to reproduce this error.

Tilmann Starke
SOFTWORK GmbH

Help to prevent global warming by writing cool software.


<<...>>

Attachment: PPOSTEST.ZIP
Description: Zip compressed data

Reply via email to