Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
815 views
in Technique[技术] by (71.8m points)

c# - Cannot find namespace 'System.Data.SqlServerCe'

I did include the System.Data.SqlServerCe dll, put using System.Data.SqlServerCe; in my code, but when I open the .NET page I get:

The type or namespace name 'SqlServerCe' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

I have nave no idea how to fix this. Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This can be solved confirming following 2 points:

  1. Check whether you already have System.Data.SqlServerCe namespace added to the References folder of your application. If its not there you may right click the References folder and select Add references option. From the popup window go to .Net tab and select System.Data.SqlServerCe from the list and click OK to add the namespace to the project.
  2. If you are OK with step 1, add using System.Data.SqlServerCe; to the top of your code behind file which uses the System.Data.SqlServerCe namespace.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...