lasker
User
 Fresh Boarder
| Posts: 2 |   | Karma: 0 |
|
TClientdataset
|
|
Posted: 2005/07/27 16:38 |
|
|
|
|
Hi,
I've tried a simple TClientDataSet-Application. But without success. I got: OCI_ERROR ORA-01036: Variablenname/-nummer ungültig
used update-sql: update "BRUECKMANN"."TEST_CDS" set "BETRAG" = ? where "WER" = ? and "BETRAG" = ?
the error occurs in TOCIVariable.Bind statement "Check('OCIBindByName(' + plcHldr + ')',"
It seems to me that Bind expects variables from type ":name"
Best regards Dietmar
source of Test-Form: ________________PAS_______________________________________ unit CdsFMU;
interface {
DROP TABLE test_cds; CREATE TABLE test_cds ( WER VARCHAR2(7) NULL, betrag NUMBER(8,2) NULL ) / INSERT INTO TEST_CDS (WER,BETRAG) VALUES('Hase',10);
CREATE UNIQUE INDEX ux_test_cds ON test_cds (Wer) /
} uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, dbkDBGridO, dbkDBGridP, dbkDBGrid, ComCtrls, dbkStatusBar, ToolWin, dbkToolBar, dbkCdsAction, ActnList, dbkFktComp, dbkSqlListe, DB, DBClient, dbkClientDataSet, Provider, dbkDataSetProvider, ExtCtrls, DBCtrls, StdUserMessDef, dbkTimer;
type TForm1 = class(TForm) acL: TCdsActionList; acCdsSpeichern: TCdsSpeichern; acCdsNSMDW: TCdsNSMDWAction; acCdsVerwerfen: TCdsAction; tlb: TdbToolBar; stb: TdbStatusBar; grd: TdbDBGrid; ToolButton1: TToolButton; ToolButton2: TToolButton; ToolButton3: TToolButton; sc: TDataSource; dp: TdbDataSetProvider; c: TdbClientDataSet; sqla: TSqlAusfuehren; nav: TDBNavigator; tim: TdbTimer; procedure FormShow(Sender: TObject); procedure timTimer(Sender: TObject); private procedure INIT_FORMULAR(var message: TMessage); message CM_INIT_FORMULAR; { Private-Deklarationen } public { Public-Deklarationen } end;
var Form1: TForm1;
implementation
uses ConDMU;
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject); begin c.Oeffnen; c.Edit; c['BETRAG'] := c['BETRAG'] + 1; c.Post; PostMessage(Handle, CM_INIT_FORMULAR, 0, 0); end;
procedure TForm1.INIT_FORMULAR(var message: TMessage); begin tim.Enabled := True; end;
procedure TForm1.timTimer(Sender: TObject); begin acCdsSpeichern.Execute; end;
end. ________________DFM_______________________________________ object foCds: TfoCds Left = 575 Top = 251 Width = 376 Height = 164 Caption = 'foCds' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object tlb: TToolBar Left = 0 Top = 0 Width = 368 Height = 29 ButtonHeight = 21 ButtonWidth = 55 Caption = 'tlb' ShowCaptions = True TabOrder = 0 object btn: TToolButton Left = 0 Top = 2 Caption = 'Speichern' ImageIndex = 0 OnClick = btnClick end end object DBGrid1: TDBGrid Left = 0 Top = 29 Width = 368 Height = 108 Align = alClient DataSource = sc TabOrder = 1 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] end object con: TOCIDatabase UserName = '?' Password = '?' ServerName = '?' LoginPrompt = False Left = 24 Top = 24 end object q: TOCIQuery Left = 72 Top = 24 end object dp: TDataSetProvider DataSet = q Constraints = True Left = 120 Top = 24 end object c: TClientDataSet Aggregates = <> Params = <> ProviderName = 'dp' OnReconcileError = cReconcileError Left = 168 Top = 24 end object sc: TDataSource DataSet = c Left = 216 Top = 24 end end
|
|