Académique Documents
Professionnel Documents
Culture Documents
DBMS Sample
[CONNECTIONS] NUM_CONNECTIONS=4 [CONNECTION_1] DESCRIPTION=DSN using FileDSN CONNECTIONTYPE=FILEDSN FILEDSN=SQL2008.DSN TRUSTED_CONNECTION=1 [CONNECTION_2] DESCRIPTION=DSN using DSN CONNECTIONTYPE=DSN DSN=OKGIS TRUSTED_CONNECTION=0 USERNAME=AdminUser PASSWORD=Admin
[CONNECTION_4] DESCRIPTION=Connection String 2 CONNECTIONTYPE=CONNECTIONSTRING CONNECTIONSTRING=DRIVER=SQL Server Native Client 10.0;SERVER=localhost\sqlexpress;DATABASE=OKGIS2008 TRUSTED_CONNECTION=0 USERNAME=MI_MGR PASSWORD=MI_MGR
Every connection is a new opportunity
DBMS Sample
Forudstning
Vi har en spatial database, her SQL Server 2008 Databasen indeholder MapInfo.MapInfo_MapCatalog
tabellen Der er spatiale tabeller i databasen, som ogs er registreret i MapCatalog
bne en tilslutning
Server_Connect( toolkit, connect_string ) toolkit is a string value identifying the remote interface, for example, "ODBC", "ORAINET". Valid values for toolkit can be obtained from the Server_DriverInfo( ) function.
connect_string is a string value with additional information necessary to obtain a connection to the database.
Dim nConnection As Integer nConnection = Server_Connect(ODBC, DSN=GIS2008) connect_string kan vre en lang rkke ting som angiver hvilken database og bruger man nsker at tilslutte til og som. Vrdierne kan angives via en datakilde eller direkte i connect_string
bne en tilslutning
MS Access database
Fil datakilde
bne en tilslutning
System datakilde
Tilslutningsstreng
Lukke en tilslutning
Server ConnectionNumber Disconnect ConnectionNumber is an integer value that identifies the specific connection.
Egenskaber p en tilslutning
Server_ConnectInfo( ConnectionNo, Attr )
ConnectionNumber is the integer returned by the Server_Connect( ) function that identifies the database connection.
Attr is a code indicating which information to return.
....
Analysere tabeller/tabelstruktur
Server_NumCols( StatementNumber ) StatementNumber is an integer value that identifies information about an SQL statement.
Analysere tabeller/tabelstruktur
Server_ColumnInfo( StatementNumber, ColumnNo, Attr )
StatementNumber is an integer value that identifies information about an SQL statement. ColumnNo is the number of the column in the table, starting at 1 with the leftmost column. Attr is a code indicating which aspect of the column to return.
Analysere tabeller/tabelstruktur
ConnectionNumber is an integer value that identifies an existing connection. SQLQuery is a SQL query statement (in native SQL dialect plus object keywords) that generates a result set. The MapInfo linked table is linked to this result set. ConnectionString is a string used to connect to a database server. See Server_Connect( ) function. TableName is the alias of the MapInfo table to create. FileSpec is an optional tab filename. If the parameter is not present, the tab filename is created based on the alias and current directory. If a FileSpec is given and a tab file with this name already exists, an error occurs. ReadOnly indicates that the table should not be edited. Toolkitname is a string indicating the type of connection, ODBC or ORAINET.
Every connection is a new opportunity
Sprgsml?