Pitney-bowes MapXtreme Manual do Utilizador Página 175

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 174
Chapter 8: Working with Data
Table Metadata (TableInfo)
MapXtreme v7.1 182 Developer Guide
has no ability to modify the IDbCommand object to fetch a specific record. Thus, a second
IDbCommand object must be supplied for this purpose. The “FetchByKey” IDbCommand object
must meet the following requirements:
When ExecuteReader is called on this command object, it must produce a data reader that has
the same columns as the sequential command object and in the same order.
The FetchByKeyCommand must contain a Parameters collection and must contain one
parameter for each member of the key. For example, if the TableInfo.KeyColumns specifies a
key as consisting of the “city” and “state” columns, then the FetchByKeyCommand must contain
two parameter objects. The first parameter object is assigned a value representing the first
column specified in the TableInfo.KeyColumns collection (e.g., a value for “city”), the second
parameter object is assigned a value representing the second column specified in the
TableInfo.KeyColumns collection (e.g., a value for “state”), and so on. When ExecuteReader is
called on the FetchByKeyCommand, the reader must return the record which represent s the
specified key.
This example illustrates how to create a MapInfo Table that accesses data through the ADO.NET
connected command objects.
VB example:
Public Shared Sub MapInfo_Data_TableInfoAdoNet2(ByVal connection _
As MIConnection)
Dim ti As TableInfoAdoNet = New TableInfoAdoNet("EuropeanCities")
Dim _conn As OleDbConnection = New _
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data _
Source=C:\Data\EuropeCities.mdb")
Dim selectQuery As String = "SELECT City, Country, Continent, _
Pop_1994 FROM EuropeCities"
Dim _OleDbCommand As OleDbCommand = New OleDbCommand(selectQuery)
_OleDbCommand.Connection = _conn
selectQuery = selectQuery + " where City = @City AND _
Country = @Country"
Dim _OleDbKeyCommand As OleDbCommand = New _
OleDbCommand(selectQuery)
_OleDbKeyCommand.Parameters.Add("@City", OleDbType.Char)
_OleDbKeyCommand.Parameters.Add("@Country", OleDbType.Char)
_OleDbKeyCommand.Connection = _conn
' The MapInfo Table will Open/Close the connection as necessary.
' If this is expensive the application could open the connection
' before opening the table and closing the connection after the
' table is closed.
ti.SequentialCommand = _OleDbCommand
ti.FetchByKeyCommand = _OleDbKeyCommand
' Tell the table which column(s) constitute a key - for this table
' it is acompound key consisting of values from the City and County
' columns.
Dim sc As StringCollection = New StringCollection
sc.Add("City")
sc.Add("Country")
Vista de página 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 639 640

Comentários a estes Manuais

Sem comentários

Radio Shack 43-1236 Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Kassettenrekorder Radio Shack 43-1236.
Wir stellen 1 PDF-Handbücher Radio Shack 43-1236 zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Bedienungsanleitung






Weitere Produkte und Handbücher für Kassettenrekorder Radio Shack

Modelle Dokumententyp
28 Bedienungsanleitung   Radio Shack 28 User's Manual, 44 Seiten
14-1132 Bedienungsanleitung   Radio Shack 14-1132 User's Manual, 4 Seiten
SCR-64 Bedienungsanleitung   Radio Shack SCR-64 User's Manual, 7 Seiten
CTR-122 Bedienungsanleitung   Radio Shack CTR-122 User's Manual, 24 Seiten
DVD / VCR Bedienungsanleitung   Radio Shack DVD / VCR User's Manual, 28 Seiten
49-2514 Bedienungsanleitung   Radio Shack 49-2514 User's Manual, 8 Seiten
14-1117 B Bedienungsanleitung    Radio Shack 14-1117 B User's Manual, 4 Seiten
Portable Cassette Recorder Bedienungsanleitung   Radio Shack Portable Cassette Recorder User's Manual, 12 Seiten
CD-3319 Bedienungsanleitung   Sole Control SC460, SC460R and DSC460, 10 Seiten
voice activated Microcassette Recorder Bedienungshandbuch   Radio Shack voice activated Microcassette Recorder Owner`s manual [en] , 32 Seiten
Portable Cassette Recorder Bedienungshandbuch   Radio Shack Portable Cassette Recorder Owner`s manual, 16 Seiten
voice activated Microcassette Recorder Bedienungshandbuch   Radio Shack voice activated Microcassette Recorder Owner`s manual, 28 Seiten
CTR-94 Bedienungshandbuch   Radio Shack CTR-94 Owner`s manual, 24 Seiten
AM/FM Cassette Car Stereo Bedienungshandbuch   Radio Shack AM/FM Cassette Car Stereo Owner`s manual, 16 Seiten
AM/FM Auto Reverse Cassette Bedienungshandbuch   Radio Shack AM/FM Auto Reverse Cassette Owner`s manual, 28 Seiten
Micro Bedienungshandbuch   Radio Shack Micro Owner`s manual, 20 Seiten
AM/FM Auto Reverse Cassette Bedienungshandbuch   Radio Shack AM/FM Auto Reverse Cassette Owner`s manual, 28 Seiten
CD-3315 Bedienungshandbuch   Radio Shack CD-3315 Owner`s manual, 22 Seiten
Portable Cassette Recorder Spezifikationen   Radio Shack Portable Cassette Recorder Specifications, 2 Seiten
Portable Cassette Recorder Bedienungshandbuch   Radio Shack Portable Cassette Recorder Owner`s manual, 40 Seiten