hello i am getting a overflow error when I try to run this:
here is the error: - System.Data.OleDb.OleDbException was unhandled
-
Message="Overflow"
-
Source="Microsoft JET Database Engine"
-
ErrorCode=-2147217833
-
StackTrace:
-
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
-
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
-
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
-
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
-
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
-
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
-
at WindowsApplication1.Form1.button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Brad\Desktop\WindowsApplication1\WindowsApplication1\Form1.cs:line 55
-
at System.Windows.Forms.Control.OnClick(EventArgs e)
-
at System.Windows.Forms.Button.OnClick(EventArgs e)
-
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
-
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
-
at System.Windows.Forms.Control.WndProc(Message& m)
-
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
-
at System.Windows.Forms.Button.WndProc(Message& m)
-
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
-
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
-
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
-
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
-
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
-
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
-
at System.Windows.Forms.Application.Run(Form mainForm)
-
at WindowsApplication1.Program.Main() in C:\Documents and Settings\Brad\Desktop\WindowsApplication1\WindowsApplication1\Program.cs:line 17
-
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
-
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
-
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
-
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
-
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
-
at System.Threading.ThreadHelper.ThreadStart()
here is the code: - using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Data.OleDb;
-
using System.Configuration;
-
using System.Data;
-
using System.Drawing;
-
using System.Text;
-
using System.Windows.Forms;
-
-
namespace WindowsApplication1
-
{
-
-
public partial class Form1 : Form
-
{
-
public Form1()
-
{
-
InitializeComponent();
-
}
-
private OleDbConnection connection;
-
private OleDbDataAdapter adapter;
-
private OleDbCommand command;
-
-
private void Form1_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void tabPage1_Click(object sender, EventArgs e)
-
{
-
-
}
-
-
private void ConnectToDB()
-
{
-
connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
-
"Data Source=" + @"C:\Documents and Settings\Brad\Desktop\WindowsApplication1\WindowsApplication1\CD DATABASE.mdb");
-
connection.Open();
-
}
-
-
private void button1_Click(object sender, EventArgs e)
-
{
-
ConnectToDB();
-
OleDbCommand objCmd;
-
String strSQLCommand = "INSERT INTO CLIENT VALUES ('" + CLIENT_NUMBER.Text + "','" + CLIENT_LAST_NAME.Text + "','" + FIRST_NAME.Text + "','" + CLIENT_ADDRESS_1.Text + "','" + CLIENT_ADDRESS_2.Text + "','" + CITY.Text + "','" + STATE.Text + "','" + ZIP.Text + "','" + PHONE_NUMBER.Text + "','" + PREF_PAYMENT.Text + "','" + PREF_ACCOUNT.Text + "','" + MUSIC_TYPE.Text + "')";
-
objCmd = new OleDbCommand(strSQLCommand, connection);
-
objCmd.ExecuteNonQuery();
-
label4.Text = "Your Info has been Added";
-
CLIENT_NUMBER.Text = " ";
-
CLIENT_LAST_NAME.Text = " ";
-
CLIENT_FIRST_NAME.Text = " ";
-
CLIENT_ADDRESS_2.Text = " ";
-
CLIENT_ADDRESS_1.Text = " ";
-
CITY.Text = " ";
-
STATE.Text = " ";
-
ZIP.Text = " ";
-
PHONE_NUMBER.Text = " ";
-
PREF_PAYMENT.Text = " ";
-
PREF_ACCOUNT.Text = " ";
-
MUSIC_TYPE.Text = " ";
-
}
The Access database is Access 2003 and VS 2005 professional
-Brad
0 1491 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Codemonkey |
last post by:
Hi,
When I first installed Visual Studio 2003, I noticed I was getting the
follow error when showing a form:
A first chance exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation
It is being thrown on the line that attempts to add the...
|
by: olle |
last post by:
Hi everyone.
I am an Access developer having worked with Access-dev. projects for
many years on Sql server databases and Access.
For the internet I have been using traditional asp.
But now I have tried asp.net and this tool seemes great to me.
Haven't tried Vb for Visual Studio net, but hope to do that in the very
future.
Hope that this...
|
by: Ralph Purtcher-Wydenbruck |
last post by:
This is a worrying bug, and indicates a potential problem in the Framework
CLR. This bug affected a project I was working on, which behaved differently
when run from the Visual Studio IDE than when run by double clicking on the
project's EXE file. The problem can be replicated easily:
Create a new project in Visual Studio 2003 and add the...
|
by: surfrat_ |
last post by:
Hi,
I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb
database. Please help me to sort this out.
Problem 1:
The Microsoft page "How to: Connect to Data in an Access Database"
|
by: Mike |
last post by:
Hello All,
Please, if anyone can point me to the problem, I'd sure appreciate it!
I am very new to VB programming and not a programmer to begin with.
This is part of a Visual Basic 2005 Express Edition program to control a remote basketball
scoreboard display unit.
All I'm trying to do is add 5 byte variables and store the result in an...
| |
by: Edwin Smith |
last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do
anything with the second form. This seems to have started when I added some
SQL tables from a Pervasive v.9 database using the Pervasive ODBC driver.
The devenv.exe process hangs and will not respond with about 50% cpu usage
and about 100 megs of memory used.
I am...
|
by: bharathreddy |
last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation.
Team Foundation is a set of tools and technologies that enable a team to collaborate and coordinate a project (software or non software projects). The team collaboration is achieved by several tools...
|
by: Cindy H |
last post by:
Hi
I am currently using Visual Studio.Net 2003 running on Windows Server 2000
operating system.
I have used Visual Studio.net 2003 connecting to Access 2002 databases in
the pass with great success.
Now, I have a need to go to Access 2007 which produces database.accdb file
instead of database.mdb.
I've used ole db Jet 4.0 to connect to...
|
by: =?Utf-8?B?ZGF2aWQ=?= |
last post by:
Last week I asked a question about connection to database from client machine
(developer machine). There are two types of security setup for SQL Server
database: Windows only and "SQL
Server and Windows" under (local)Windows NT node of Enterprise Manager.
-----
First, I set the database security as "SQL
Server and Windows" under...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |