Patent ID: 7539971

Claim:
A method for deploying at least one stored procedure to a device, the method comprising: generating a data project and a device database associated with an installation property within a solution; associating the data project with the device database; adding the at least one stored procedure to the data project, the at least one stored procedure comprising a precompiled set of one or more statements for accessing data in a database, one of the stored procedures being a trigger that is executed in response to a data modification operation; receiving a request to build the solution, and, responsive to the request: automatically embedding each stored procedure in the data project into the device database, wherein embedding each stored procedure comprises: determining whether the at least one stored procedure has been previously embedded in the device database; and if the at least one stored procedure has been previously embedded, then removing the previously embedded stored procedure; and automatically registering each stored procedure in the data project with the device database; deploying the device database with the at least one embedded stored procedure as a single unit to the device; and installing the device database with the at least one embedded stored procedure on the device according to the installation property, wherein installing the device database on the device according to the installation property comprises overwriting an existing device database that was previously installed on the device if the installation property comprises an always overwrite setting, overwriting the existing device database if the installation property comprises an overwrite if different setting and the deployed device database is different from the existing device database, and installing the deployed device database on the device if the installation property comprises a never overwrite setting and no existing device database was previously installed on the device.