Secondary Data Source Action Queries

K

Ken

It seems we can update a database directly using Primary (Main)
database connections.
However, when I try and alter the DataAdapter's Command to an "Update
XXX set …." Type SQL statement and call the Query() method although no
error is thrown the database is not updated.

How can turn a Select query into an Action Query on a secondary Data
Source?

-Ken
 
S

Steve van Dongen [MSFT]

It seems we can update a database directly using Primary (Main)
database connections.
However, when I try and alter the DataAdapter's Command to an "Update
XXX set …." Type SQL statement and call the Query() method although no
error is thrown the database is not updated.

How can turn a Select query into an Action Query on a secondary Data
Source?

You probably have the secondary datasource set to Receive Only.
However, to issue an UPDATE statement all you need is ADO.

var oConn = new ActiveXObject("ADODB.Connection");
oConn.ConnectionString = XDocument.QueryAdapter.Connection;
oConn.ConnectionTimeout = XDocument.QueryAdapter.Timeout;
oConn.Open();
oConn.Execute("UPDATE ...");
oConn.Close();

Regards,
Steve
 
Top