-- 代码
只有这一个表有问题,其他的没问题!
手动去加入这个外部表时,说表已经存在,输出表结构并未看到该表
\'根据要求链接的数据库位置不同
If e.User.Type <> UserTypeEnum.Developer Then
If e.Name = "youfoeData" Then
e.C & e.ProjectPath & "Source\\Data\\youfoeData.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***"
ElseIf e.Name = "settings"
e.C & e.ProjectPath & "Source\\Data\\settings.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***"
End If
Else
Dim net As Boolean = True
Dim path As String = e.ProjectPath & "***\'设置文件存放路径
If e.Name = "youfoeData" Then
\'判断指定文件夹里是否有链接字符串的指定文档
Dim file As String = path & "str.txt"
If FileSys.FileExists(file) Then
\'如果有,则取字符串作为链接字符串(网络版时才需要链接)
Dim s As String = FileSys.ReadAllText(file, Encoding.Default)
If Connections.TryConnect(s) Then
e.ConnectionString = s
Else
net = False
End If
Else
net = False
End If
\'如果没有,则链接默认的数据库
If net = False Then
Dim str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & path & "youfoeData.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***"
If Connections.TryConnect(str) Then
e.ConnectionString = str
Else
e.EditConnectionString()
End If
End If
ElseIf e.Name = "settings"
e.C & path & "settings.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***"
End If
End If
[此贴子已经被作者于2019/2/21 13:14:30编辑过]