Set, Get Active record value

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
zguven
Posts: 21
Joined: Mon 05 May 2008 19:39

Set, Get Active record value

Post by zguven » Tue 23 Sep 2008 12:33

I use OracleDateTable and DataLink.

1.How to set/get selected row field values with datalink?
2.How to get row status (Insert, Update....) with datalink?


I am delphi programmer.
I need equivalent C# code.

Code: Select all

 If MyQuery.State=dsInsert then 
     MyQuery.FieldByName("ID").AsInteger:=1;

Code: Select all

  MyQuery.Insert;

Code: Select all

  MyQuery.Edit;

Code: Select all

  MyQuery.Post;

Code: Select all

  MyQuery.Cancel;
Thanks.

zguven
Posts: 21
Joined: Mon 05 May 2008 19:39

Post by zguven » Thu 25 Sep 2008 05:17

Where is the support?

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 25 Sep 2008 09:37

Code: Select all

dataLink1.AddNew();
DbDataRowView curRow = (DbDataRowView)dataLink1.Current;
curRow.BeginEdit();
if(curRow.Row.RowState == DataRowState.Detached) //Here you get the RowState of the row at current 
                                                                               //DataLink Position
    curRow.Row["deptno"] = 60; 
curRow.Row["dname"] = "MyDept"; //Here you modify values
curRow.EndEdit();
Please give us more information on the definition of MyQuery variable.

zguven
Posts: 21
Joined: Mon 05 May 2008 19:39

Post by zguven » Thu 25 Sep 2008 10:17

I want to use your "InterForm" tech. with DataLink. I have Many Forms and Master/Detail.

Your TOraQuery component very useful in delphi.
MyQuery defined as TOraQuery.

And what about OnBeforePost, OnAfterPost events.

Thanks.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 25 Sep 2008 13:51

Our .NET components inherit the Microsoft's ADO.NET architecture, that's why we are not able to provide you the full analogue of the aforementioned events and properties.

You can refer to MSDN for more information:

http://msdn.microsoft.com/en-us/library ... S.80).aspx

OnBeforePost and OnAfterPost events' equivalents are RowUpdating and RowUpdated events of OracleDataTable component.

Post Reply