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
eejay
NA
5
0
'System.Data.OleDb.OleDbException'
May 26 2005 12:07 PM
All, I'm getting a: 'An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll' after adding my 'phonenumber' field to: string str = string.Format("INSERT INTO Customers (firstname, lastname, address, city, state,zipcode,phonenumber) VALUES ('{0}','{1}','{2}','{3}','{4}','{5}','{6}')", this.fname.Text,this.lname.Text,this.address.Text,this.city.Text,this.state.Text,this.zipcode.Text,this.phonenum.Text); OleDbCommand command = new OleDbCommand(str,conn); command.ExecuteNonQuery(); conn.Close(); The error points to line: command.ExecuteNonQuery(); If I remove phonenumber everything works fine. The database is set to accept 'Number' as the data type for this field. I should also add I'm using an Access dB. Any ideas?
Reply
Answers (
4
)
How to receive mail using SMTP ?
Large String Manipulation