说详细点。你是指用Automation与mapinfo通讯还是只是使用mapinfo?
链接数据库的mapbasic命今好象是
Register Table "c:\mapinfo\data\rpt23.dbf"
Type "DBF"
Into "Report23" Open Table "c:\mapinfo\data\Report23"
下面是详细说明:
Register Table source_file
{ Type "NATIVE" |
Type "DBF" [ Charset char_set ] |
Type "ASCII" [ Delimiter delim_char ] [ Titles ] [ CharSet char_set ] |
Type "WKS" [ Titles ] [ Range range_name ] |
Type "XLS" [ Titles ] [ Range range_name ] }
[ Into destination_file ]source_file is a string that specifies the name of an existing database, spreadsheet, or text file.
char_set is the name of a character set; see the separate CharSet discussion.
delim_char specifies the character used as a column delimiter. If the file uses Tab as the delimiter, specify 9. If the file uses commas, specify 44.
range_name is a string indicating a named range (e.g. "MyTable") or a cell range (e.g. an Excel range can be specified as "Sheet1!R1C1:R9C6" or as "Sheet1!A1:F9").
destination_file specifies the name to give to the MapInfo table. This string may include a path; if it does not include a path, the table file is built in the same directory as the source file. DescriptionBefore you can use a non-native file (e.g. a dBASE file) in MapInfo, you must register the file. The Register Table statement tells MapInfo to examine a non-native file (e.g. filename.DBF) and build a corresponding table file (filename.TAB). Once the Register Table operation has built a table file, you can access the file as a MapInfo table.
The Register Table statement does not copy or alter the original data file. Instead, it scans the data, determines the datatypes of the columns, and creates a separate table file. Note: The table is not opened automatically. To open the table, use an Open Table statement.
Note that each datafile need only be registered once. Once the Register Table operation has built the appropriate table file, subsequent MapInfo sessions simply Open the table, rather than repeating the Register Table operation. The Type clause specifies where the file came from originally. This consists of the keyword Type, followed by one of the following character constants: NATIVE, DBF, ASCII, WKS, or XLS. The other info is necessary for preparing certain types of tables.
The CharSet clause specifies a character set. The char_set parameter should be a string such as "MacRoman" or "WindowsLatin1". If you omit the CharSet clause, MapInfo uses the default character set for the hardware platform that is in use at run-time. See the CharSet clause discussion for more information.
The Delimiter clause is followed by a string containing the delimiter character. The default delimiter is a TAB. The Titles clause indicates that the row before the range of data in the worksheet should be used as column titles. The Range clause allows the specification of a named range to use. The Into clause is used to override the table name or location of the .TAB file. By default, it will be named the same as the data file, and stored in the same directory. However, when reading a read-only device such as a CD-ROM, you need to store the .TAB file on a volume that is not read-only. The Register Table statement cannot be used to turn a raster image file (e.g. Photo.GIF) into a MapInfo table (Photo.TAB). For a program to build a table based on a raster image, the program must build the table file (e.g. Photo.TAB) using file i/o statements such as Open File and Print #. For an example of building a table file for a raster image, see the MapBasic User's Guide, Chapter 7.
链接数据库的mapbasic命今好象是
Register Table "c:\mapinfo\data\rpt23.dbf"
Type "DBF"
Into "Report23" Open Table "c:\mapinfo\data\Report23"
下面是详细说明:
Register Table source_file
{ Type "NATIVE" |
Type "DBF" [ Charset char_set ] |
Type "ASCII" [ Delimiter delim_char ] [ Titles ] [ CharSet char_set ] |
Type "WKS" [ Titles ] [ Range range_name ] |
Type "XLS" [ Titles ] [ Range range_name ] }
[ Into destination_file ]source_file is a string that specifies the name of an existing database, spreadsheet, or text file.
char_set is the name of a character set; see the separate CharSet discussion.
delim_char specifies the character used as a column delimiter. If the file uses Tab as the delimiter, specify 9. If the file uses commas, specify 44.
range_name is a string indicating a named range (e.g. "MyTable") or a cell range (e.g. an Excel range can be specified as "Sheet1!R1C1:R9C6" or as "Sheet1!A1:F9").
destination_file specifies the name to give to the MapInfo table. This string may include a path; if it does not include a path, the table file is built in the same directory as the source file. DescriptionBefore you can use a non-native file (e.g. a dBASE file) in MapInfo, you must register the file. The Register Table statement tells MapInfo to examine a non-native file (e.g. filename.DBF) and build a corresponding table file (filename.TAB). Once the Register Table operation has built a table file, you can access the file as a MapInfo table.
The Register Table statement does not copy or alter the original data file. Instead, it scans the data, determines the datatypes of the columns, and creates a separate table file. Note: The table is not opened automatically. To open the table, use an Open Table statement.
Note that each datafile need only be registered once. Once the Register Table operation has built the appropriate table file, subsequent MapInfo sessions simply Open the table, rather than repeating the Register Table operation. The Type clause specifies where the file came from originally. This consists of the keyword Type, followed by one of the following character constants: NATIVE, DBF, ASCII, WKS, or XLS. The other info is necessary for preparing certain types of tables.
The CharSet clause specifies a character set. The char_set parameter should be a string such as "MacRoman" or "WindowsLatin1". If you omit the CharSet clause, MapInfo uses the default character set for the hardware platform that is in use at run-time. See the CharSet clause discussion for more information.
The Delimiter clause is followed by a string containing the delimiter character. The default delimiter is a TAB. The Titles clause indicates that the row before the range of data in the worksheet should be used as column titles. The Range clause allows the specification of a named range to use. The Into clause is used to override the table name or location of the .TAB file. By default, it will be named the same as the data file, and stored in the same directory. However, when reading a read-only device such as a CD-ROM, you need to store the .TAB file on a volume that is not read-only. The Register Table statement cannot be used to turn a raster image file (e.g. Photo.GIF) into a MapInfo table (Photo.TAB). For a program to build a table based on a raster image, the program must build the table file (e.g. Photo.TAB) using file i/o statements such as Open File and Print #. For an example of building a table file for a raster image, see the MapBasic User's Guide, Chapter 7.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货