| 发表于:2007-05-18 16:20:19 楼主 |
我在程序中加了select case 语句后出现错误“未指定的问题”进入调试后错指在conn.str处,不加select case 语句之前运行良好 谢谢 代码:(按钮使用的是数组) private sub commandt_click(index as integer) on error goto error1 dim conn as new adodb.connection dim rst as new adodb.recordset dim str as string, sql as string str = "provider = microsoft.jet.oledb.4.0;persist security info=false;data source= " & app.path & "\db1.mdb " conn.open str conn.cursorlocation = aduseclient sql = " select * from gerenxinxi " set rst = conn.EXECute(sql) set text1.datasource = rst set text2.datasource = rst set text3.datasource = rst set text9.datasource = rst set text10.datasource = rst text1.datafield = "id " text2.datafield = "xingming " text3.datafield = "zhiwu " text9.datafield = "yijibumen " text10.datafield = "erjibumen " dim i as integer i=index select case i case 0 rst.movefirst if rst.bof then msgbox "顶部 " rst.movefirst 'end if case 1 rst.movelast if rst.eof then msgbox "底部 " rst.movelast end if end select set datagrid1.datasource = rst exit sub error1: msgbox err.description end sub |
|
|
|
|