以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  怎样通过代码获取当前数据源的连接IP  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=89242)

--  作者:大红袍
--  发布时间:2016/8/17 19:56:00
--  

参考代码

 

Dim str As String= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\dv rrxaI600 007\\Desktop\\123.MDB;Persist Security Info=False"
Dim mc = System.Text.RegularExpressions.Regex.Matches(str, "(?<=Data Source=).*?(?=;)")
If mc.count > 0 Then
    msgbox(mc(0).value)
End If

 

http://www.foxtable.com/webhelp/scr/1943.htm