Click here to Skip to main content
15,914,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have two queries


1.while creating setup and deployment in visual studio 2008 its giving me
'oledb32.dll' should be excluded because its source file 'C:\Program Files\Common Files\System\Ole DB\oledb32.dll' is under Windows System File Protection.

error how can i solve? it is important because this dll which store sql server user's information in xls im downloaded new one and trying to import in my project but project no taking this dll any clue or suggestion pls give me and


2. im find one code(in asp.net but im implement in ado.net) which is use for creating dynamic connection string i'll paste here that code bt before that i want ask you i want display this form only when it is detect new server otherwise no and if we enter details in first time then this form cannot display next time when user open software
here is code which write in asp.net

XML
<body>
    <form id="form1" runat="server" >
    <div>
        Connection name:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
        Connection string:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
        Provider name:<asp:TextBox ID="TextBox3" runat="server">System.Data.SqlClient</asp:TextBox><br />
        <asp:Button ID="Button1" runat="server" Text="Button"
            onclick="Button1_Click1" />
    </div>
    </form>
</body>

    protected void Button1_Click1(object sender, EventArgs e)
    {
        var configuration = WebConfigurationManager.OpenWebConfiguration("~");
        var section = (ConnectionStringsSection)configuration.GetSection("connectionStrings");
        section.ConnectionStrings.Add(
            new ConnectionStringSettings(TextBox1.Text, TextBox2.Text, TextBox3.Text)
            );
        configuration.Save();
    }
Posted
Updated 20-Apr-13 7:25am
v2
Comments
Zoltán Zörgő 20-Apr-13 13:29pm    
Two questions = two topics. Please, remove the second question and start a new thread with it.
RedDk 20-Apr-13 13:32pm    
OLEDB32.DLL? That IS a windows system file. It's also related to .lib of the same name if I'm not mistaken. Where exactly is this error popping up? In the Task List or Output window at late compile/link? Venture that any Windows installation of any epoch already has this file as a member of the Star Chamber.
Atul Rokade 21-Apr-13 5:11am    
error is giving when i build the setup that time its giving me oledb32.dll error
RedDk 21-Apr-13 15:14pm    
AR,

I'm no expert in ASP.NET dev so I shouldn't offer any more advice other than, after having cruised through the list of posts I think are related to this oledb32.dll impasse, even googling it to no avail, perhaps a new approach. Try looking at the MSDN "Quickstart" for VS. There's one for ADO.NET. This link is VS2010 but it still might be useful:
http://msdn.microsoft.com/en-us/library/cc668796(v=vs.90).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900