我有以下代码,从而产生插入查询格式化的字符串
For Each f As String In Directory.GetFiles(d)
objSQLStringBuilder.Append("insert into table1 (full_path, file_name) values ('" & f.Replace("'", "''") & "', '" & f.Remove(0, Len(d) + 1).Replace("'", "''") & "');")
Next
然而,它找到的路径我需要如下
格式化路径格式如下c:\program files\microsoft office\winword.exe
file:///c:/program%20files/microosoft%20office/winword.exe
我该如何修改上面的代码来做到这一点?
它从来不是一个好主意,“生成插入查询”,特别是使用用户输入 – 2011-01-07 16:27:18