import java.io.*
public class Test{
public static void main(String[] args){
try {
//执行批处理文件
Process process = Runtime.getRuntime().exec("D:\\retrace.bat")
/派慎/取得命令结果的输出流
InputStream fis = process.getInputStream()
//用一个读输出流类蚂丛去读
BufferedReader br = new BufferedReader(new InputStreamReader(fis))
String line = null
//逐行读取输尘物敬出到控制台
while ((line = br.readLine()) != null) {
System.out.println(line)
}
} catch (IOException e) {
e.printStackTrace()
}
}
}
如果对你有帮助,请及时采纳。
SP_CONFIGURE 'SHOW ADVANCED OPTIONS',1RECONFIGURE
EXEC SP_CONFIGURE 'Ad Hoc Distributed Queries',1
RECONFIGURE
插入的好段代码:
INSERT INTO dbo.Resources(ResourcesUrl,ResourcesLink,ResourcesText) SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0'悉袜烂,
'睁漏Excel 8.0HDR=YESDatabase=F:\Book1.xls', [sheet1$])
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)