@好处多多
@好处多多
1.文件路径
strFileFrom="\\172.16.20.12\e$\CCL_Development\ProExcelTest\Engg_Index_DFS\Report"
这种形式的在C#中会报错.
解决方法:
strFileFrom="\\\\172.16.20.12\\\e$\\\CCL_Development\\\ProExcelTest\\\Engg_Index_DFS\\\Report"
strFileFrom=@"\\172.16.20.12\e$\CCL_Development\ProExcelTest\Engg_Index_DFS\Report"
2.程序中写SQL语句
一般方法:
string strSQL = "SELECT id,title,note,stime FROM tabnews ";
strSQL += "WHERE title like '%abc%' ";
修改后:
string strSQL = @"SELECT id,title,note,stime FROM tabnews
WHERE title like '%abc%' ";