TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jinwolf
NA
176
0
CE problem,
Dec 9 2003 10:20 AM
Hi all I have a problem with CE. I am writing a database application for PocketPC using SQlServer CE 2000 and C#. The problem is I get an unhandled error, see code below: protected void GetData() { SqlCeConnection sqlConn = new SqlCeConnection("Persist Security Info=False;password=chris;Data Source=Zettel"); SqlCeCommand sqlZettel = new SqlCeCommand("SELECT Gekauft, Item, Menge, Messe FROM Zettel", sqlConn); if(sqlZettel.Connection.State == ConnectionState.Closed) sqlZettel.Connection.Open(); // The PROBLEM!! SqlCeDataReader drZettel = sqlZettel.ExecuteReader(CommandBehavior.CloseConnection); // The PROBLEM!! while(drZettel.Read()) { ListViewItem lvItem = new ListViewItem(); lvItem.Checked = Convert.ToBoolean(drZettel["Gekauft"].ToString()); lvItem.SubItems.Add(drZettel["Item"].ToString()); lvItem.SubItems.Add(drZettel["Menge"].ToString()); lvItem.SubItems.Add(drZettel["Messe"].ToString()); listView1.Items.Add(lvItem); } drZettel.Close(); sqlZettel.Connection.Close(); } can anyone see anything wrong with what I am doing? I have followed the sample code from Microsoft but it still doesn't work. Thanks in advance Lee
Reply
Answers (
1
)
Well, I know what causes this now.. PLEASE HELP
VS.NET, C#, c++, DLL and sockests ....