网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

( 35 )设在工程文件中有一个标准模块,其中定义了如下记录类型:

Type Books

Name As String * 10

TelNum As String * 20

End Type

在窗体上画一个名为 Command1 的命令按钮,要求当执行事件过程 Command1_Click 时,在顺序文件Person.txt 中写入一条 Books 类型的记录。下列能够完成该操作的事件过程是

A ) Private Sub Command1_Click()

Dim B As Books

Open “ Person.txt ” For Output As #`1

B.Name=InputBox( “ 输入姓名 ” )

B.TelNum=InputBox( “ 输入电话号码 ” )

Write #1,B.Name,B.TelNum

Close #1

End Sub

B ) Private Sub Command1_Click()

Dim B As Books

Open “ Person.txt ” For input As #`1

B.Name=InputBox( “ 输入姓名 ” )

B.TelNum=InputBox( “ 输入电话号码 ” )

Print #1,B.Name,B.TelNum

Close #1

End Sub

C ) Private Sub Command1_Click()

Dim B As Books

Open “ Person.txt ” For Output As #`1

B.Name=InputBox( “ 输入姓名 ” )

B.TelNum=InputBox( “ 输入电话号码 ” )

Write #1,B

Close #1

End Sub

D ) Private Sub Command1_Click()

Open “ Person.txt ” For input As #`1

Name=InputBox( “ 输入姓名 ” )

TelNum=InputBox( “ 输入电话号码 ” )

Print #1, Name, TelNum

Close #1

End Sub


参考答案

更多 “ ( 35 )设在工程文件中有一个标准模块,其中定义了如下记录类型:Type BooksName As String * 10TelNum As String * 20End Type在窗体上画一个名为 Command1 的命令按钮,要求当执行事件过程 Command1_Click 时,在顺序文件Person.txt 中写入一条 Books 类型的记录。下列能够完成该操作的事件过程是A ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Write #1,B.Name,B.TelNumClose #1End SubB ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For input As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Print #1,B.Name,B.TelNumClose #1End SubC ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Write #1,BClose #1End SubD ) Private Sub Command1_Click()Open “ Person.txt ” For input As #`1Name=InputBox( “ 输入姓名 ” )TelNum=InputBox( “ 输入电话号码 ” )Print #1, Name, TelNumClose #1End Sub ” 相关考题
考题 假定在工程文件中有一个标准模块,其中定义了如下记录类型:Type BooksName As String*10TelNuin As String*20End Type要求在执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。将以下程序补充完整。Private Sub Command1_Clickk()DimB As Booksopen"c:\person.txt"For output As 1B.Name=InputBox("请输入姓名")B.TelNum=InputBox("请输入电话号码")write 1,______close 1End Sub

考题 假定在工程文件中有一个标准模块,其中定义了如下记录类型 Type Books NalTle As String*10 TelNum As String*20 End Type 要求当执行事件过程ComlBandl_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是( )。A.Ptivate Sub Commandl_Click() DimB As Books Open"c:\Person.txt"For Output As#1B.Name=InputBox(“输入姓名”)C.Private Sub Conullandl_CHCk() DimBAs Books Open"c:\Person.txt"For Ouputut As#1 Name=hputBox(“输入姓名”) Temum=InputBox(“输入电话号码”) Whte#1,B Close#1 End Sub D.Privam Sub Commnandl_Click() DimBAsBook Open"C:\Person.tx

考题 设在工程中有一个标准模块,其中定义了如下记录类型:Type Books Name As String ( 10 Te1Num As String * 20End Type在窗体上添加一个名为Command1的命名按钮。要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。请在横线中填入适当的内容,将程序补充完整。Private Sub Command1_Click() Dim B As____ Open "c:\person.txt"For Output As #1 B.Name=InputBox("输入姓名") B.Te1Num=InputBox("输入学号") Write#1,B.Name,B.Te1Num Close #1End Sub

考题 设在工程文件中有一个标准模块,其中定义了下列记录类型: Type Books Name As String*10 TelNum As String*20 End,Type 在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1 Click 时,在顺序文件Person.txt中写入一条Books类型的记录。下列能够完成该操作的事件过程是( )。A.Private Sub Command1 Click( ) Dim B AS Books Open"Person txt"For Output As#1 Name=InputBox(”输入姓名”) relNum=lnputBox(”输入电话号码”) Wlite#1 B Name,B TelNum Ch,se#1 End SubB.Private Sub Command1 Click( ) Dim B AS Books Open"Person txt"For Input As#1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print#1,B.Name,B.TelNam Close#1 End SubC.Private Sub Command1 Click( ) Dim BAS Books Open"Person txt"For Output As#1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Write#1,B Close#1 End SubD.Private Sub Commandl Click( ) Open"Person txt"For Input As#1 Name=lnputBox("输入姓名") TelNum=lnputBox("输入电话号码") Prim#1 Name TelNum Close#1 End Sub

考题 在窗体上有一个名称为Command1的命令按钮,并编写有如下事件过程:记录类型定义如下:下列叙述中正确的是( )。A. 记录类型animal不能在Form1中定义,必须在标准模块中定义B. 如果文件c:\vbTest.dat不存在,则Open命令执行失败C. 由于Put命令中没有指明记录号,因此每次都把记录写到文件的末尾D. 语句“Put#1,,rec”将animal类型的两个数据元素写到文件中

考题 设在工程文件中有一个标准模块,其中定义了下列记录类型:Type BooksName As String*10TelNum As String*20End,Type在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1 Click 时,在顺序文件Person.txt中写入一条Books类型的记录。下列能够完成该操作的事件过程是( )。A.Private Sub Command1 Click( )Dim B AS BooksOpenPerson txtFor Output As#1Name=InputBox(”输入姓名”)relNum=lnputBox(”输入电话号码”)Wlite#1 B Name,B TelNumCh,se#1End SubB.Private Sub Command1 Click( )Dim B AS BooksOpenPerson txtFor Input As#1Name=InputBox(输入姓名)TelNum=InputBox(输入电话号码)Print#1,B.Name,B.TelNamClose#1End SubC.Private Sub Command1 Click( )Dim BAS BooksOpenPerson txtFor Output As#1Name=InputBox(输入姓名)TelNum=InputBox(输入电话号码)Write#1,BClose#1End SubD.Private Sub Commandl Click( )OpenPerson txtFor Input As#1Name=lnputBox(输入姓名)TelNum=lnputBox(输入电话号码)Prim#1 Name TelNumClose#1End Sub

考题 假定已经定义了一个名为arr_type的PL/SQL表类型,那么怎样实例化一个arr_type类型的变量() A.v_arr arr_type;B.v_arr is arr_type;C.v_arr of arr_type;D.v_arr arr_type%type;

考题 以下叙述中错误的是________。A.在一个窗体文件中用Private定义的通用过程可以被其他窗体调用B.一个工程中可以包含多个窗体文件C.窗体和标准模块需要分别保存为不同类型的磁盘文件D.全局变量可以在标准模块中定义

考题 以下叙述中错误的是________。A.全局变量可以在标准模块中定义B.窗体和标准模块需要分别保存为不同类型的磁盘文件C.在一个窗体文件中用Private定义的通用过程可以被其他窗体调用D.一个工程中可以包含多个窗体文件

考题 在随机文件操作中,定义记录类型的语句()。A.Type…End TypeB.DimC.PrivateD.Public