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
A
NA
1
0
Database update error
Nov 18 2008 8:04 AM
I'm trying to write a questionnaire that gathers info of the user and then updates a database in Access. I've managed to write the program and everything works up to the point where it updates the database, at which point it displays the error message below:
OleDbException was unhandled
Syntax error in INSERT INTO statement
I've checked it and I can't find any syntax errors in it. Could someone help me out please? I'm very new to programming, so please try to explain in as simple terms as possible. The section of code is below. Thanks for your help.
if (Found == "F")
{
if (txtPasswordInput.Text == txtConfirmPassword.Text)
{
DataRow drNewRow = m_dtLoginTable.NewRow(); //creates variable
drNewRow["Username"] = txtUsernameInput.Text;
drNewRow["Password"] = txtPasswordInput.Text;
m_dtLoginTable.Rows.Add(drNewRow);
m_dtDataAdapter.Update(m_dtLoginTable); database
m_rowPosition = m_dtLoginTable.Rows.Count - 1;
new record
}
else
{
txtError.Text = "Passwords do not match";
}
}
Reply
Answers (
4
)
access mysql database from differant places
Primary Key created by createuserwizard to use in other tables