1 Attachment(s)
[RESOLVED] 'SqlConnection' is ambiguous in the namespace 'System.Data.SqlClient'
Hi all,
I am creating class libraries in my project so that I can update code without having to update the whole app.
I created a class library project and added some code to it. I also added a reference to System.Data.SqlClient and also imported it into the class file.
I am getting an error and I have never seen it before. Been looking online and not able to find an answer yet. Any ideas? Screen shot attached.
I went here and it said:
Quote:
Represents an open connection to a SQL Server database. This class cannot be inherited.
But I am not inheriting it.
Re: 'SqlConnection' is ambiguous in the namespace 'System.Data.SqlClient'
OK. I found the answer after going through hundreds of posts. You have to remove the reference to System.Data.SqlClient and ONLY import it.
Re: [RESOLVED] 'SqlConnection' is ambiguous in the namespace 'System.Data.SqlClient'
Right, first off, never post a screenshot with a scroll bar in it. Do you know how many times I tried to drag that scroll bar to see a bit more of your code? :mad:
;)
Secondly, have you declared a class or variable anywhere named SqlConnection?
In fact, do a Find In Files across your entire solution for 'SqlConnection' and post the results.