TOraQuery (?) and ORA-01400 Error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Lefteris
Posts: 2
Joined: Wed 05 Oct 2005 16:28
Location: Athens Greece / Zurich Switzerland

TOraQuery (?) and ORA-01400 Error

Post by Lefteris » Wed 05 Oct 2005 16:43

Hi

(1)
A simple code to insert, update and delete using TOraQuery works fine for updating and deleting. Trying to insert a record like

iClientID := StrToInt(edtClientID.Text);
sSurname := edtSurname.Text;
sName := edtName.Text;
//
dm1.qrOraTemp.Close;
dm1.qrOraTemp.SQL.Clear;
dm1.qrOraTemp.Params.CreateParam(ftInteger, 'P_ClientID', ptInput);
dm1.qrOraTemp.ParamByName('P_ClientID').AsInteger := iClientID;
dm1.qrOraTemp.Params.CreateParam(ftString, 'P_Surname', ptInput);
dm1.qrOraTemp.ParamByName('P_Surname').AsString := sSurname;
dm1.qrOraTemp.Params.CreateParam(ftString, 'P_Name', ptInput);
dm1.qrOraTemp.ParamByName('P_Name').AsString := sName;
aaSQL := 'INSERT INTO SCOTT.ScottClients' +
' (ClientID, Surname, FirstName)' +
' VALUES' +
' (:P_ClientID, :P_Surname, :P_Name)';
dm1.qrOraClients.SQL.Text := aaSQL;
dm1.qrOraClients.ExecSQL;

raises the ORA-01400 Cannot Insert Null ... and then
... exception Class N-18 message 'Unknown Error 1'

Any help there please?

(2)
This ScottClient table above works fine for updating and deleting when the table IOT properties are set to "Standard, Heap Organized".
Before I did that I had used "Index Organized Table (IOT)" and the above code or what else .. would raise:
"ORA-03115: Unsupported Network Datatype or Representation"

Any comments there please ?
Thank you

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 06 Oct 2005 12:11

Please check your example code. As I can see you are mix dm1.qrOraTemp with dm1.qrOraClients.

Post Reply