Foxtable(狐表)用户栏目专家坐堂 → 请问这个代码怎么写?SQL


  共有2488人关注过本帖平板打印复制链接

主题:请问这个代码怎么写?SQL

帅哥哟,离线,有人找我吗?
hongye
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:437 积分:2943 威望:0 精华:0 注册:2011/3/15 12:49:00
请问这个代码怎么写?SQL  发帖心情 Post By:2019/1/21 21:49:00 [只看该作者]

'''
Dim s As String = FileSys.ReadAllText(e.ProjectPath & "Attachments\SqlServers.txt")
Dim arr() As String = s.Replace(vbcr,"").Split(vblf)
For i As Integer = 0 To 1
    Dim ipdata As 这里请问怎么写?
    ipdata.host = arr(i*3+2).Split("=")(1)
    If e.Name = "彬阳数据" Then
        If Filesys.FileExists(e.ProjectPath & "Attachments\SqlServers.sipcg") Then
            For iy As Integer = 1 To 1
                Dim ip As String = ipdata.host
                e.ConnectionString = e.ConnectionString.Replace("192.168.0.17",ip)
            Next
            Exit For
        End If
    End If
Next

以下是SqlServers.txt的内容
Password=112233
User ID=user
Data Source=192.168.0.18
Password=112233
User ID=user
Data Source=bnang.oicp.net

我的想法是制作一个SqlServers.txt文件
如果内网IP:192.168.0.17没有反应时,自动转到内网192.168.0.18,如果还没反应的话转到公网的bnang.oicp.net的地址
写到这里感觉不知道怎么写了,请帮忙改一下

 回到顶部