static public string GetConfigiuageConnString()
{
Guid dataLinksGuid = new Guid("2206cdb2-19c1-11d1-89e0-00c04fd7a829");
Type dataLinksType = Type.GetTypeFromCLSID(dataLinksGuid, true);
object dataLinks = Activator.CreateInstance(dataLinksType);
object connection = dataLinksType.InvokeMember("PromptNew", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, dataLinks, new object[] {}, null);
if(connection == null) return string.Empty;
Guid connetionGuid = new Guid("00000550-0000-0010-8000-00AA006D2EA4");
Type connectionType = Type.GetTypeFromCLSID(connetionGuid, true);
return connectionType.InvokeMember("ConnectionString", BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, connection, new object[] {}, null) as string;
}
{
Guid dataLinksGuid = new Guid("2206cdb2-19c1-11d1-89e0-00c04fd7a829");
Type dataLinksType = Type.GetTypeFromCLSID(dataLinksGuid, true);
object dataLinks = Activator.CreateInstance(dataLinksType);
object connection = dataLinksType.InvokeMember("PromptNew", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, dataLinks, new object[] {}, null);
if(connection == null) return string.Empty;
Guid connetionGuid = new Guid("00000550-0000-0010-8000-00AA006D2EA4");
Type connectionType = Type.GetTypeFromCLSID(connetionGuid, true);
return connectionType.InvokeMember("ConnectionString", BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, connection, new object[] {}, null) as string;
}