Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

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

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

User generated image User generated image
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

User generated image
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

SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

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!!!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi! V.S Saini,
I'll it now... Thanks!
Thanks!