Run an update query inside POS

Jul 19, 2010 5 Replies

Is there anyway to create a custom button to call an update query?



We are going to run a promotion to allow a certain percentage discount if an event occurs in the arena (we're a hockey arena and this is for our pro shop). I already have the discount and query built and it works fine if I run it from administrator, but would like to have a way to click a custom button in POS to enable and disable the discount.



Thanks!


You could try saving the update query as a batch file, then create a custom pos button that will run that batch file. Here is a sample batch file that adds the word "new" to the description of the item:

START /MIN osql -U sa -P typesapasswordhere -S hostname -d yourdatabasename

-Q "UPDATE ITEM SET DESCRIPTION = 'R/C GLIDER NEW' WHERE ITEMLOOKUPCODE '11200'"

If you need help sett> Is there anyway to create a custom button to call an update query? >

Convoluted

Great Idea... Could I pass a parm to the batch file?

Well, I did add some parm to my mac and cheese last night....

Just kidding - english please for us non-programmers (or whatever parm refers to)

Easiest thing to do is add the path to the batch file in the parameters of the custom pos button - I've done a couple that seemed to work (like the example I posted - it ran the update query as soon as I clicked on the custom POS button)

Sorry for the lame attempt at humour.....h> Convoluted

Convoluted

That was a Gouda joke.

Thanks for the info.

Dj

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required