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 2 1272
If these are all "number" type, why are you inserting strings? You might
want to start by removing the quotes around the values you're inserting.
Steve
"Deecrypt" <kn*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
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
Thank you Steve,
Problem solved. although i also had to take out all the field names
too. Seems Access 2003 does not like field names if the entire row is
going to be populated.
cheers
Khurram
Steve Barnett wrote:
If these are all "number" type, why are you inserting strings? You might
want to start by removing the quotes around the values you're inserting.
Steve
"Deecrypt" <kn*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: joemyre |
last post by:
Hi everyone,
What I'm trying to do is take php variables i got from user input, and
pass them as the MySQL query terms.
$query = "select * from ident where ".$searchtype1."=".$searchterm1."";...
|
by: shank |
last post by:
1) I'm getting this error: Syntax error (missing operator) in query
expression on the below statement. Can I get some advice.
2) I searched ASPFAQ and came up blank. Where can find the "rules"...
|
by: Dalan |
last post by:
I can't seem to find a workaround of Query Syntax Error. Actually, the
query performs just fine, except when the last record on a related
subform is deleted, then it generates a Runtime Error 3075...
|
by: Dalan |
last post by:
I'm experiencing a Query Syntax Error with an Access 97 Db. Actually,
the query performs as expected when adding any new records or editing
existing ones and even deleting records, EXCEPT when the...
|
by: KevLow |
last post by:
Hi,
Hope some kind soul can help me out here..
I'm trying to programmatically modify the column headings of a crosstab
query such that it can be dynamic based on user specified period (Month...
|
by: John Øllgård Jensen |
last post by:
Hi
Using MS Asccess 2000:
In a query I'm trying to create a new field with following expression:
FilmDate: Left(,4)
The field "FilmNo" is another text field in the query.
This is...
|
by: Kelii |
last post by:
I've been trying to get this piece to work for a few hours, but have
given up. I hope someone out there can help, I think the issue is
relatively straightforward, but being a novice, I'm stumped....
|
by: bryant |
last post by:
Hi all.
I am new to ASP and working in Expression Web. The following query
displays the information I need in the gridview for a single record.
SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
|
by: dvelst |
last post by:
Hi All,
I have the following query which was based on a working query in MySQL:
(don't be afraid of the size of the query you see below, later on I will concentrate on part of this query)
...
|
by: Yesurbius |
last post by:
I am receiving the following error when attempting to run my query. In my mind - this error should not be happening - its a straight-forward query with a subquery. I am using Access 2003 with all...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
| |