| 发表于:2008-01-22 19:44:14 楼主 |
private sub hedui_click() dim conn as adodb.connection dim rst as adodb.recordset dim atemp(3, 27) as string dim ntemp(3, 27) as string dim i%, j% set conn = new adodb.connection conn.cursorlocation = aduseclient conn.open "provider=microsoft.jet.oledb.4.0;data source=" & app.path & "\biaozhun.mdb" set rst = new adodb.recordset set rst.activeconnection = conn i = 0 if biaozhun1.text <> "" then rst.open "select * from biaozhun where steelgrade='" & steelgrade.text & "' and biaozhun='" & biaozhun1.text & "'" for j = 2 to rst.fields.count - 1 if ltrim(rst.fields(j)) <> "" then atemp(i, j / 2 - 1) = rst.fields(j) end if j = j + 1 if ltrim(rst.fields(j)) <> "" then ntemp(i, (j - 1) / 2 - 1) = rst.fields(j) end if next j rst.close end if set rst=nothing set conn=nothing end sub |
|
|
|
|