It is currently Fri Aug 01, 2014 1:48 am




Post new topic Reply to topic  [ 3 posts ] 
 Update Non Default Data Source 
Author Message
General
General

Joined: Wed Jul 29, 2009 10:55 pm
Posts: 169
Location: Ireland
Post Update Non Default Data Source
Hi

I am having some problems with an update script that is updating a database table that is not in the Default data source. The script is been run from an action performed of a button. I get an error while executing saying that there is a spelling error with the data source.

This is what I have tried but it is not working

fpmi.db.runUpdateQuery("UPDATE TBWorkOrder SET MachineID = 1 Where WorkOrderNumber = '1234567' "),[TransOPT]

Am I using the correct syntax for an update to the non default data source?


Thanks

Aidan

_________________
Regards

Aidan


Wed Aug 04, 2010 6:34 am
Profile WWW
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Update Non Default Data Source
The code should be:
Code:
fpmi.db.runUpdateQuery("UPDATE TBWorkOrder SET MachineID = 1 Where WorkOrderNumber = '1234567'", "TransOPT")

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Wed Aug 04, 2010 7:32 am
Profile WWW
General
General

Joined: Wed Jul 29, 2009 10:55 pm
Posts: 169
Location: Ireland
Post Re: Update Non Default Data Source
Hi Travis

That worked OK for me

Aidan

_________________
Regards

Aidan


Mon Aug 09, 2010 3:17 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: