Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / July 2004

Tip: Looking for answers? Try searching our database.

Secondary Data Source Action Queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken - 23 Jul 2004 02:16 GMT
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
Steve van Dongen [MSFT] - 23 Jul 2004 20:52 GMT
>It seems we can update a database directly using Primary (Main)
>database connections.
[quoted text clipped - 4 lines]
>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
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.