MATLAB DATABASE TOOLBOX RELEASE NOTES Guía de usuario Pagina 644

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 684
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 643
7 Functions — Alphabetical List
7-214
GO
Create a Microsoft SQL Server database connection conn using the JDBC driver. For
details, see “Connecting to a Database”. Then, call the stored procedure using:
Database connection conn
Stored procedure productsWithinUnitCost
Input arguments inputargs to specify a unit cost between 19 and 21
Output Java data types outputtypes to specify numeric and string data types for
product number and description
inputargs = {19,21};
outputtypes = {java.sql.Types.NUMERIC,java.sql.Types.VARCHAR};
results = runstoredprocedure(conn,'productsWithinUnitCost',...
inputargs,outputtypes)
results =
[1x1 java.math.BigDecimal]
'Snacks'
results returns a cell array that contains the product number as a Java decimal data
type and the product description as a string.
Display the product number in results.
results{1}
ans =
15
The product with product number 15 has a unit cost between 19 and 21.
Display the product description in results.
results{2}
ans =
Snacks
The product with product number 15 has the product description Snacks.
Vista de pagina 643
1 2 ... 639 640 641 642 643 644 645 646 647 648 649 ... 683 684

Comentarios a estos manuales

Sin comentarios