MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 644

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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.
Seitenansicht 643
1 2 ... 639 640 641 642 643 644 645 646 647 648 649 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare