SQL Query Syntax Error

D

Deecrypt

Hi,
I hope Im posting in the right newsgroup. I am trying to insert the
result
of the below SQL query in my Access 2003 table. All the fields in this
table
are of type Number. I'm picking up the value of a dropdownlist box and

insert the relevant values in one row of the table.

if (painPresentComboBox.Text == "RUQ")
{
int painPresent = 301717006;
string assessmentID = assessmentNoTextBox.Text;
Convert.ToInt32(assessmentID);
string insertAssessmentData = "INSERT INTO
abdominalpainassessmentrecords (assessment_id, aap_key, concept_id,
attribute, value) VALUES ('" + assessmentID + "', '1', '21522001',
'363698007', '" + painPresent + "')";
OleDbCommand insertAssessment = new
OleDbCommand(insertAssessmentData, o);
insertAssessment.ExecuteNonQuery();
}


Please Help. Desperate beyond belief


Khurram
 
D

Deecrypt

Thank you, Problem solved. although i also had to take out all the
field names too. Seems does not like field names if the entire row is
going to be populated.

cheers

Khurram
 
Top