I now the warehouse receipt, submit only one input, too much trouble, use adoquery + datesouce + aodconnect + sql2000
I don't know in the picture above, can add check, one-time submit multiple do?
CodePudding user response:
1, establish a common storage list table, it includes choice, name, specifications, quantity, unit price, quantity, date of put in storage, and other fields, the supplier in advance entry list of commonly used objects dataOpen the table 2, the warehousing, select the project, click on the selection and entry into the Treasury quantity data, such as
3, mass storage, set up a key event, through the cycle inventory list table, judgment, selection and the effective number of warehousing, through SQL statements, to the inventory table, batch scions into the inbound data,
Complete the mass storage, so roughly, for reference only,
CodePudding user response:
One-time submit multiplePerformance on the interface, is the point of you submit, box will be written to the database,
In the program, that is, you need to use multiple insert into to build insert statement, and then through the transaction to commit,
Here is a use the SQL transaction,
The SET IMPLICIT_TRANSACTIONS ON
DECLARE @ myerror INT - used to store the error number
The SET @ myerror=0
Insert into TBL (c1, c2,... ) values (' v1 ', 'v2,... )
SET @ myerror=@ myerror + @ @ ERROR - if an ERROR, then the ERROR accumulation number
Insert into TBL (c1, c2,... ) values (' v1 ', 'v2,... )
SET @ myerror=@ myerror + @ @ ERROR - if an ERROR, then the ERROR accumulation number
IF @ myerror> 0 - if execution error
The BEGIN
PRINT 'transfer failure, is preparing to roll back the transaction! '
The ROLLBACK TRANSACTION
END
ELSE, if no problems in the process of
The BEGIN
PRINT 'transfer success, ready to commit the transaction! '
COMMIT the TRANSACTION
END
CodePudding user response:
Use temporary table, increase a column indicates whether or not the choice, the default is 0, box, this column is 1,When presented, screening the temporary table, find out this as 1, then add to the official table,
CodePudding user response: