<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 6  文章 - 129  trackbacks - 0
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(14)

    隨筆檔案(6)

    文章分類(467)

    文章檔案(423)

    相冊

    收藏夾(18)

    JAVA

    搜索

    •  

    積分與排名

    • 積分 - 825709
    • 排名 - 49

    最新評論

    閱讀排行榜

    評論排行榜

    轉(zhuǎn)自:http://hi.baidu.com/zydpc/blog/item/3268273eb8e80ce055e72338.html
    描述

    Inserts data into a DataWindow control, DataStore object, or graph control from data in a file.一個文件插入數(shù)據(jù)到一個數(shù)據(jù)窗口控件,數(shù)據(jù)存儲對象,圖形或數(shù)據(jù)控制。 The data can be tab-separated text, comma-separated text, XML, or dBase format 2 or 3.這些數(shù)據(jù)可以制表符分隔的文本,以逗號分隔的文本,XML或dBASE格式2或3。 The format of the file depends on whether the target is a DataWindow (or DataStore) or a graph and on the type of graph.該文件的格式取決于該目標(biāo)是一個數(shù)據(jù)窗口(或數(shù)據(jù)存儲)或圖和圖型。

    For DataWindow and DataStore syntax, see the ImportFile method for DataWindows in the DataWindow Reference or the online Help .對于數(shù)據(jù)窗口和DataStore的語法,請參閱聯(lián)機幫助 ImportFile 的方法,在數(shù)據(jù)窗口DataWindows參考或 。

    Applies to適用于

    Graph controls in windows and user objects.圖控制在窗口和用戶對象。 Does not apply to graphs within DataWindow objects, because their data comes directly from the DataWindow.不適用于在數(shù)據(jù)窗口對象的圖形,因為它們的數(shù)據(jù)直接來自數(shù)據(jù)窗口。

    Syntax句法

    graphname . ImportFile (  { importtype}, filename {, startrow {, endrow {, startcolumn } } } ) graphname。ImportFile((importtype),(文件名,startrow(,endrow(,startcolumn))))

    Argument論據(jù)

    Description描述

    graphname graphname

    The name of the graph control to which you want to copy data from the specified file.該控件的名稱圖,您要復(fù)制文件數(shù)據(jù)從指定的。

    importtype (optional) importtype(可選)

    An enumerated value of the SaveAsType DataWindow constant.一個數(shù)據(jù)窗口不斷枚舉值的SaveAsType。 If this argument is specified, the importtype argument can be specified without an extension.如果該參數(shù)指定,importtype參數(shù)可以指定不帶擴展名。 Valid type arguments for ImportFile are:論點ImportFile有效的類型有:

    • Text!文字!

    • CSV! CSV格式!

    • XML! XML的!

    • DBase2! DBase2!

    • DBase3! DBase3!

     

    filename 文件名

    A string whose value is the name of the file from which you want to copy data.一個字符串,其值是文件名從你要復(fù)制的數(shù)據(jù)。 The file must be an ASCII, tab-separated file (TXT), comma-separated file (CSV), Extensible ), or dBase format 2 or 3 file (DBF).該文件必須是一個ASCII,制表符分隔的文件(TXT),逗號分隔文件(CSV),可擴展),或2或3的dBase格式文件(DBF的)。 Specify the file's full name.指定文件的全名。 If the optional importtype is not specified, the name must end in the appropriate extension.如果沒有指定可選的importtype,名稱必須結(jié)束在適當(dāng)延長。

    If you do not specify filename or if it is null , ImportFile prompts the user for a file name.如果你不指定文件名 ,或者如果它為null,ImportFile提示文件的名稱為一個用戶。 The remaining arguments are ignored.剩余的參數(shù)將被忽略。

    startrow (optional) startrow(可選)

    The number of the first detail row in the file that you want to copy.該文件要拷貝數(shù)的第一行中的細(xì)節(jié)。 The default is 1.默認(rèn)是1。

    For default XML import, if startrow is supplied, the first N ( startrow -1) elements are skipped, where N is the DataWindow row size.對于默認(rèn)XML導(dǎo)入,如果startrow提供, 一個N(startrow -1)的元素都被跳過, 其中 N是數(shù)據(jù)窗口行的大小。

    For template XML import, if startrow is supplied, the first對于XML導(dǎo)入模板,如果startrow提供,首 ( startrow -1) occurrences of the repetitive row mapping defined in the template are skipped. (startrow -1)發(fā)生了重復(fù)的行映射模板中定義跳過。

    endrow (optional) endrow(可選)

    The number of the last detail row in the file that you want to copy.該文件要拷貝數(shù)的最后細(xì)節(jié)行中。 The default is the rest of the rows.默認(rèn)的是該行的其余部分。

    For default XML import, if endrow is supplied, import stops when N * endrow elements have been imported, where N is the DataWindow row size.對于默認(rèn)XML導(dǎo)入,如果endrow提供,進口停止當(dāng) N * endrow內(nèi)容已經(jīng)進口的, 其中 N是數(shù)據(jù)窗口行的大小。

    For template XML import, if endrow is supplied, import stops after endrow occurrences of the repetitive row mapping defined in the template have been imported.對于XML導(dǎo)入模板,如果endrow提供,該模板中定義導(dǎo)入后停止endrow行中出現(xiàn)的重復(fù)測繪已導(dǎo)入。

    startcolumn (optional) startcolumn(可選)

    The number of the first column in the file that you want to copy.匱乏的拷貝數(shù)列的第一個文件中的你。 The default is 1.默認(rèn)是1。

    For default XML import, if startcolumn is supplied, import skips the first ( startcolumn - 1) elements in each row.對于默認(rèn)XML導(dǎo)入,如果startcolumn提供,進口跳過第一(startcolumn - 1)在每個行元素。

    This argument has no effect on template XML import.這一論點并沒有對模板的效果XML導(dǎo)入。

    Returns返回

    Long.長。 Returns the number of rows that were imported if it succeeds and one of the following negative integers if an error occurs:返回發(fā)生錯誤的行的數(shù)目進口,如果成功,它下面的一個負(fù)整數(shù),如果一:

    • -1 No rows or startrow value supplied is greater than the number of rows in the file -1沒有行或startrow值是文件大于供給的數(shù)量的行

    • -2 Empty file or input data does not match number of columns or required column type -2文件為空或輸入的數(shù)據(jù)類型不匹配的列數(shù)或要求列

    • -3 Invalid argument -3無效參數(shù)

    • -4 Invalid input -4輸入無效

    • -5 Could not open the file -5無法打開文件

    • -6 Could not close the file -6無法關(guān)閉文件

    • -7 Error reading the text -7錯誤閱讀文本

    • -8 Unsupported file name suffix (must be *.txt, *.csv, *.dbf or *.xml) -8不支持的文件名后綴(必須是*. txt文件,*. CSV格式,*. dbf或*. xml的)

    • -10 Unsupported dBase file format (not version 2 or 3) -10不受支持的dBASE文件格式(而不是版本2或3)

    • -11 XML Parsing Error; XML parser libraries not found or XML not well formed -11 XML解析錯誤; XML解析器庫不存在或沒有很好形成的XML

    • -12 XML Template does not exist or does not match the DataWindow -12 XML模板不存在或不匹配的數(shù)據(jù)窗口

     

    If any argument's value is null , ImportFile returns null . If the optional importtype argument is specified and is not a valid type, ImportFile returns -3.如果任何參數(shù)的值 null, 返回 null ImportFile。如果可選importtype參數(shù)指定,而不是一個有效的類型,ImportFile返回-3。

    Usage用法

    The format of the file can be indicated by specifying the optional importtype parameter, or by including the appropriate file extension.該文件的格式,可通過指定可選的顯示importtype參數(shù),或通過包括適當(dāng)?shù)奈募U展名。

    For graph controls, ImportFile only uses three columns and ignores other columns.對于圖形控制,ImportFile只使用3列,而忽略其他列。 Each row of data must contain three pieces of information.每個數(shù)據(jù)行中必須包含三個信息件。 The information depends on the type of graph:該信息取決于圖表類型:

    • For all graph types except scatter, the first column to be imported is the series name, the second column contains the category, and the third column contains the data.對于所有類型,除了散布圖,第一列從外地輸入的是該系列的名稱,第二列包含類,第三列包含的數(shù)據(jù)。

    • For scatter graphs, the first column to be imported is the series name, the second column is the data's x value, and the third column is the y value.對于散布圖,第一列從外地輸入的是該系列的名稱,第二列是數(shù)據(jù)的x值,第三列是y值。

     

    You can add data to more than one series by specifying different series names in the first column.您可以添加數(shù)據(jù)到多個系列的第一列指定不同的系列名稱研究。 To let users select the file to import, specify a null string for filename . PowerBuilder displays the Select Import File dialog box.為了讓用戶選擇要導(dǎo)入的文件, 文件名指定一個字符串。PowerBuilder中顯示選擇導(dǎo)入文件對話框。

    Double quotes The location and number of double quote marks in a field in a tab delimited file affect how they are handled when the file is imported. 雙引號雙數(shù)場引號中的位置和一個制表符分隔的文件影響到他們?nèi)绾翁幚頃r,該文件是進口的。 If a string is enclosed in one pair of double quotes, the quotes are discarded.如果字符串被雙引號括在一對的報價將被丟棄。 If it is enclosed in three pairs of double quotes, one pair is retained when the string is imported.如果是雙引號括在三對,一對是保留字符串時是進口的。 If the string is enclosed in two pairs of double quotes, the first pair is considered to enclose a null string, and the rest of the string is discarded.如果字符串引號括在雙兩對,第一對被認(rèn)為是一個空字符串括起來,而其余的字符串將被丟棄。

    When there is a double quote at the beginning of a string, any characters after the second double quote are discarded.當(dāng)有一個雙引號的字符串開始時,雙引號的所有字符后,第二次將被丟棄。 If there is no second double quote, the tab character delimiting the fields is not recognized as a field separator and all characters up to the next occurrence of a double quote, including a carriage return, are considered to be part of the string.如果沒有第二個引號,制表符分隔的返回字段是不承認(rèn)所有作為字段分隔符和字組成的一個運輸?shù)南乱粋€出現(xiàn)的一個雙引號,包括被認(rèn)為是字符串的一部分。 A validation error is generated if the combined strings exceed the length of the first string.驗證錯誤,如果合并生成字符串的字符串長度超過了第一。

    Double quotes after the first character in the string are rendered literally.雙引號字符的字符串字面呈現(xiàn)后的第一次。 Here are some examples of how tab-delimited strings are imported into a two-column DataWindow:這里有一些例子,說明制表符分隔的字符串被導(dǎo)入到一個兩列的數(shù)據(jù)窗口:

    Text in file文本文件

    Result結(jié)果

    "Joe" TAB "Donaldson" “喬”統(tǒng)計表“唐納森”

    Joe Donaldson喬唐納森

    Bernice TAB """Ramakrishnan"""伯尼斯統(tǒng)計表“”“萊瑪克里斯南”“”

    Bernice "Ramakrishnan"伯尼斯“萊瑪克里斯南”

    ""Mary"" TAB ""Li"" “”瑪麗“”標(biāo)簽“,”禮“”

    Empty cells空細(xì)胞

    "Mich"ael TAB """Lopes""" “邁克”機場快線統(tǒng)計表“”“洛佩斯”“”

    Mich "Lopes"邁克“洛佩斯”

    "Amy TAB Doherty" “艾米統(tǒng)計表多爾蒂”

    Amy<TAB>Doherty in first cell, second cell empty艾米<Tab>鍵多爾蒂在第一個單元格,第二個單元格為空

    3""" TAB 4" 3“”“標(biāo)簽4”

    3""" 4" 3“”“4”

    注意 Specifying a null string for file name If you specify a null string for filename , the remaining arguments are ignored. 指定一個文件名稱為字符串 ,如果你指定一個字符串為文件名 ,其余的參數(shù)被忽略。 All the rows and columns in the file are imported.文件的所有行和列的都是進口的。

    Examples范例

    Example 1 示例1

    This statement copies all the data in the file D:\EMPLOYEE.TXT to gr_employee starting at the first row:本聲明中的所有數(shù)據(jù)復(fù)制的文件D:\ EMPLOYEE.TXTgr_employee行開始在第一:

    gr_employee. ImportFile ("D:\EMPLOYEE.TXT") gr_employee。ImportFile(的“D:\ EMPLOYEE.TXT”)

     

    Example 2 例2

    This statement copies the data from the file D:\EMPLOYEE.TXT starting with row 2 column 3 and ending with row 30 column 5 to the graph gr_employee :本聲明的副本文件 D中的數(shù)據(jù)來自:\ EMPLOYEE.TXT開始,第2行第3列和行結(jié)尾的5至30列圖gr_employee:

    gr_employee. ImportFile ("D:\EMPLOYEE.TXT", 2, 30, 3) gr_employee。ImportFile(的“D:\ EMPLOYEE.TXT”,2,30,3)

     

    Example 3 例3

    The following statements are equivalent.下面的語句是等價的。 Both import the contents of the XML file named myxmldata :這兩種導(dǎo)入XML文件的內(nèi)容命名myxmldata:

    gr_control.ImportFile(myxmldata.xml) gr_control.ImportFile(myxmldata.xml)
                gr_control.ImportFile(XML!, myxmldata) gr_control.ImportFile(XML的!,myxmldata)

     

    Example 4 范例4

    This example causes PowerBuilder to display the Specify Import File dialog box:這個例子使PowerBuilder中顯示指定文件導(dǎo)入對話框:

    string null_str字符串null_str

     

    SetNull(null_str) SetNull(null_str)

     

    dw_main. ImportFile (null_str) dw_main。ImportFile(null_str)


    posted on 2010-06-01 22:47 Ke 閱讀(8647) 評論(0)  編輯  收藏 所屬分類: powerBuilder
    主站蜘蛛池模板: 最近国语视频在线观看免费播放| 亚洲精品一区二区三区四区乱码| 免费一级毛片不卡不收费| 久久精品免费一区二区喷潮| 亚洲精品在线免费观看| 99久久99久久免费精品小说| 久99久精品免费视频热77| 香蕉成人免费看片视频app下载| a毛片全部免费播放| 三年片在线观看免费| 中文字幕一区二区免费| 日韩免费无码视频一区二区三区| 久久免费观看国产99精品| 亚洲视频在线免费观看| 182tv免费视视频线路一二三| 6080午夜一级毛片免费看| 国产黄色免费网站| 97无码免费人妻超级碰碰夜夜| 成人免费一级毛片在线播放视频| 最近2019中文免费字幕| 国产乱弄免费视频| 久久亚洲国产精品五月天婷| 亚洲精品高清国产一线久久| 亚洲AV综合色一区二区三区| 亚洲美女大bbbbbbbbb| 亚洲精品天堂在线观看| 色欲色欲天天天www亚洲伊| 四虎影视在线看免费观看| 99视频在线观看免费| 久久久久久毛片免费播放| 91久久成人免费| 免费看的黄色大片| 亚洲人妻av伦理| 亚洲五月激情综合图片区| va天堂va亚洲va影视中文字幕| 亚洲av中文无码字幕色不卡| 日韩精品无码永久免费网站| 国产精品1024在线永久免费 | 国产亚洲A∨片在线观看| 伊人久久综在合线亚洲2019| 日韩亚洲人成在线|