Here's my trigger code:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ `piecerate`.`spUpdate_Queue`$$
create trigger `piecerate`.`spUpdate_Queue` AFTER UPDATE on
`piecerate`.`queue`
for each row BEGIN
call spUpdateQueueCounts(new.iorderid);
insert into crap (iid,iorderid) values...
I have an UPDATE trigger on my inventory_transactions table, set to call the spUpdateInventoryCounts procedure for the iInventoryID (FK) record being modified. Here's the code for my update trigger:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ sp_IT_Update$$
create trigger sp_IT_Update...
MySQL5 doesn't like my UPDATE trigger:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ `tiremate`.`sp_updatetrans`$$
CREATE TRIGGER `tiremate`.`sp_updatetrans` AFTER UPDATE on
`tiremate`.`inventory_transactions`
FOR EACH ROW BEGIN
update inventory
set iqtyinstock = (select sum(nqty)
from...
From the MySQL link you provided, I now see the --host option (and -u and -p) so I'm believing that I should simply create a batch file on the fly with this behavior (and then delete it afterwards to ensure that userid/pwd info is NOT seen by strangers):
MYSQL // will put the computer into...
Can my client app call a Stored Proc on the server to get it to kick off the backup on itself?
btw--thanks for the link--I had read that before posting but didn't see the part about where it connected to the remote host.
Ok, I follow you...but what if this client PC is not where the data is hosted? For example, ClientPC runs the app, but it connects to the data on ServerPC. My understanding is that invoking the client would be fine as long as the data is on that box.
Ditto....well deserved. I've really benefitted (and hence my software products have too) from your tips on Interface design.
May you have many years yet in the VFP community.
--Michael J. Babcock, MB Software Solutions, LLC
mbsoftwaresolutions dot com
Because we are no longer able to write to Program Files, does that mean that we should adjust our programs to point to a folder in the Application Data folder instead? I've got a demo software that writes to a subfolder called "Data" under the installed folder (which is in Program...
My VFP9 app uses a MySQL5 database. I've reviewed the syntax of the MYSQLDUMP command but I'm unsure of how to invoke that from my VFP9 app.
I'd basically like to have a simple option on my app's menu that says "Backup database" whereby my code then runs something like...
Here's the connection string I use commonly with my VFP9 apps connecting to a MySQL5 backend:
DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;UID=mike;PWD=foxrocks;DATABASE=mydb;option=131609
I was wondering what other values for the OPTION parameter folks use? Sometimes, I get some...
Here's the connection string I use commonly with my VFP9 apps connecting to a MySQL5 backend:
DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;UID=mike;PWD=foxrocks;DATABASE=mydb;option=131609
I was wondering what other values for the OPTION parameter folks use? Sometimes, I get some...
I had heard a rumor (perhaps about MySQL) that if you design tables to have field widths of multiles-of-8 (like varchar(8), varchar(16), varchar(64)) that they'd perform better (perhaps due to internal optimizations based on computer-word lengths).
Any truth to that?
tia,
--Michael
We're on the same page...thanks. I never meant to give the impression that the PK on iid was going away...that's a given to be there for me. ;-)
I think I was mixing up constraints and candidate indexes. You've made it clear now. Thanks!
--Michael
Hi Mike,
Good advice, and I had added the unique constraint for data integrity. But my real question is "how many indexes (beyond the PK): one for cReference and one for cReference+cCode or would just one for cReference+cCode suffice? (iow, does having both indexes--cReference AND...
I created a simple lookup table with these columns:
iid = auto-inc, primary key
cReference = varchar(30), reference to owner/entity
cCode = varchar(16), abbreviation used as FK in other tables
cDescription = varchar(64), description for cCode
I've got a primary index on iid (obviously), and I...
Assuming an index on cCustNum field, which would be better in terms of performance?
1) select distinct cCustNum from MyTable where <somecondition>
2) select cCustNum from MyTable where <somecondition> GROUP BY cCustNum
QA's estimated execution plan seems to show that these are identical, but...
George,
Looks like your idea originally is going to work (the one where I create the Temp Cursor and then just do an INSERT INTO ...SELECT SQL.
Thanks!
--Michael
George,
The difference in the two queries is this: one gets ALL the records for a given sales rep, whereas the other one only gets a specific sales rep. You're query above gets the specific sales rep or any that match a NULL value....it does NOT satisfy the need to grab ALL of the sales reps...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.