Upload a binary point matching or correlation template list containing one or more templates to tblTemplate in an acoustics database. One or more templates may be indexed by name or position from the template list for upload.
dbUploadTemplate(templates, which.one, db.name = "acoustics", uid , pwd, analyst,
locationID = "", date.recorded = "", recording.equip = "", species.code,
type, ...)
This function is invoked for its side effect, which is to insert the template list into tblTemplate in an acoustics database. Successful upload is marked by a report of the upload time; unsuccessful upload will report any errors encountered.
TemplateList
object of class binTemplateList
or corTemplateList
to upload.
Indexing option for individual templates within the TemplateList
object. Indexing may be by name or numerical position. If missing, all templates within the list are uploaded.
Name of the ODBC connector data source corresponding to the acoustics database.
User ID to allow ODBC connector to connect to database, if not present in ODBC connector.
Password to allow ODBC connector to connect to database, if not present in ODBC connector.
Numerical key value corresponding to the user's tblPerson.pkPersonID value in the acoustics database.
Numerical key value corresponding to the location's tblLocation.pkLocationID value in the acoustics database.
Dates template clip was recorded, in a recognizable POSIX format: YYYY/MM/DD.
Equipment used to record template clip.
Character value corresponding to the species' tblSpecies.fldSpeciesCode value in the acoustics database; usually a 4, 6, or 8-character code. Codes not in the database will return a cryptic error and cause upload to fail.
Character value identifying template type, in c("BIN", "COR"). Some partial matching is performed.
Additional arguments to RODBC::odbcConnect
.
Jon Katz
dbUploadTemplate
assumes a database structure identical to that provided in the acoustics schema. If the username and password are present in the ODBC datasource they do not need to be provided. It is possible to store only the username in the datasource and enter a password, but the reverse will not work.
The following must be true for upload to succeed: The value for analyst must be present in tblPeople.pkPeopleID The value for locationID must be present in tblLocation.pkLocationID the value for species.code must be present in tblSpecies.fldSpeciesCode
dbDownloadTemplate