?
Solved

Why I should I get this error? NotImplementedException was unhandled by user code?

Posted on 2010-08-23
6
Medium Priority
?
1,633 Views
Last Modified: 2013-12-14
This code is error..
string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
When I run the program that line is error and says "NotImplementedEx.........."
 
using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

.bmp .bmp
using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

.bmp
using System; 
using System.IO; 
using Gizmox.WebGUI.Forms; 
using VB6 = Microsoft.VisualBasic.Compatibility.VB6.Support; 

namespace PhoneBook
{
	internal partial class Form1
		: Gizmox.WebGUI.Forms.Form
		{
		
			private void  btn_Cancel_Click( Object eventSender,  EventArgs eventArgs)
			{
					this.Close();
			}
			
			private void  btn_Add_Click( Object eventSender,  EventArgs eventArgs)
			{
					ADODB.Recordset v_rsAdd = new ADODB.Recordset();
					
					
					if (tbx_FirstName.Text == "" || tbx_LastName.Text == "")
					{
						MessageBox.Show("You should fill all the textboxes.", "Phone Book", MessageBoxButtons.OK, MessageBoxIcon.Error);
						return;
					}
					
					string v_sActiveConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + Path.GetDirectoryName(Application.ExecutablePath) + "\\PhoneBook.mdb";
					v_rsAdd.Open("SELECT * FROM PhoneBook ORDER BY FirstName", v_sActiveConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic, -1);
					
					v_rsAdd.AddNew(Type.Missing, Type.Missing);
					
					if (Form1.DefInstance.tbx_FirstName.Text == "")
					{
						v_rsAdd.Fields["FirstName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["FirstName"].Value = Form1.DefInstance.tbx_FirstName.Text;
					}
					
					if (Form1.DefInstance.tbx_LastName.Text == "")
					{
						v_rsAdd.Fields["LastName"].Value = "";
					}
					else
					{
						v_rsAdd.Fields["LastName"].Value = Form1.DefInstance.tbx_LastName.Text;
					}
					
					v_rsAdd.Update(Type.Missing, Type.Missing);
					MessageBox.Show("Done", Application.ProductName);
					return;
					
			}

Open in new window

0
Comment
Question by:Whing Dela Cruz
  • 3
  • 2
6 Comments
 
LVL 30

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 300 total points
ID: 33506376
You are using some custom libraries, therefore hard to say what's happening. You need to give the line number where the error occur and the exception stack trace. Otherwise it's hard to understand what's happening...
0
 

Author Comment

by:Whing Dela Cruz
ID: 33506437
Hi! is there any other way to migrate C# project to the Web? I am beginner with C# and I have a simple project of it that wanted to apply to Web. Can you give me some idead on how to do it C# to Web? Thanks!!!
0
 
LVL 16

Accepted Solution

by:
Vikram Singh Saini earned 1200 total points
ID: 33508363
Hi,

First of all I would like to ask you to put your code snippets in appropriate try...catch() block where you think error can occur.

One more question what is  ADODB.Recordset ?

And then let us know in which line exception is occuring.

Regards,
V.S.Saini
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Assisted Solution

by:Vikram Singh Saini
Vikram Singh Saini earned 1200 total points
ID: 33520408
Hi,

To migrate C# project to the Web:

(1) Identify your all controls in Project in each and every Form. Then check out their same functionality  controls in asp.net. For e.g. combobox in window form is represented by dropdownlist control in asp.net

(2) Then identify all events of Form and of each controls. You would need to check if those events are same in asp.net. For e.g. Button has click in both (form and asp.net) but TextBox has very limited events in asp.net.

(3) For implementing your project in asp.net you would need to understand the Asp.net Page LifeCycle. And it would be nice if you understand all the very basic concepts of Asp.Net. Such as all controls in asp.net, basic events & concepts such as Session, Application, ViewState, & much more. These can be found on website by searching on google.

If you are ready with the above declared weapons; you can fight the battle in Asp.Net field.

Regards,
V.S.Saini
0
 

Author Comment

by:Whing Dela Cruz
ID: 33523070
Hi! V.S Saini,
I'll it now... Thanks!
0
 

Author Closing Comment

by:Whing Dela Cruz
ID: 33631395
Thanks!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question