Solved

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

Posted on 2010-08-23
6
1,505 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 29

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 100 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 400 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 16

Assisted Solution

by:Vikram Singh Saini
Vikram Singh Saini earned 400 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
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.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now