I've tried so many ways now, I couldn't even list them. For the life of me, I cannot seem to update my database, I either get "error in syntax on update command" - strSQL="UPDATE [q1], [q2], [q3], [q4], [q5], [q6], [q7], [q8],"+
-
" [q9], [q10], [q11], [q12], [q13], [q14], [q15],"+
-
" [q16], [q17], [q18], [q19], [q20], [q21], [q23],"+
-
" [q24], [q26], [q28], [q34], [q35], [q38], [q39],"+
-
" [q40], [q42], [q43], [q44], [q45], [q46], [q47],"+
-
" [q48], [q51], [q52], [q53], [q54], [q57], [q58],"+
-
" [q61], [q62], [q63], [q66], [q67], [q70], [q71],"+
-
" [q72], [q73], [q74], [q75], [q84], [q85], [q86],"+
-
" [q87], [q88], [q89], [q90], [q91], [q98], [q99],"+
-
" [q100], [q101],"+" [q102], [q103], [q104], [TCAIMSSite],"+
-
" [DTG_Submit], [LoginID], [TestPhase]"+
-
" FROM t_EOT_User WHERE RecNum="+RecNum.Text;
Anyone?
3 8591
At first glance, I can tell that you've declared all the fields you want. But I think the problem is with an update clause, the format has to be like this:
update table
set field1 = "value";
Basically, your DB doesn't know what you want it to place into those fields.
Also, the update clause you are using looks like a select statement.
Yes, that is incorrect syntax. A SQL UPDATE statement looks like this: - UPDATE table_name
-
SET field_name = 'some_value', field_name2 = 'some_other_value'
-
WHERE some_identifying_field = some_condition
If you are using a SqlDataAdapter and DataSet, you can use the .Update() method on the adapter, assuming that you have provided proper INSERT, UPDATE, and DELETE statements to the adapter.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: tshad |
last post by:
I am just trying to decide whether to split my code and uses code behind. I
did it with one of my pages and found it was quite a bit of trouble.
I know that most people (and books and articles)...
|
by: Wernfried Schwenkner |
last post by:
In a page I have a button. On the code behind in the click event I wan't
to fill a data table of the sql server.
Therefor I have place a SqlDataSource on the page in the designer,
configured all...
|
by: siaj |
last post by:
Helo All,
If some one has faced a similar issue..
My datagrid Update command is not getting fired in fact it seems that the no
event fires on clicking the update link. Although the cancel and the...
|
by: siaj |
last post by:
Hello All,
If some one has faced a similar issue..
My datagrid Update command is not getting fired in fact it seems that the no
event fires on clicking the update link. Although the cancel and the...
|
by: needin4mation |
last post by:
Hi, I was trying to update some 1.1 code with 2005. I ran into
problems, so I thought I'd just use notepad to make a minor change to
the .cs file. When I run the .aspx file (and refresh), nothing...
|
by: travhale |
last post by:
in a new project using .net 2005, c#.
getting err message "Update requires a valid UpdateCommand when passed
DataRow collection with modified rows."
source RDBMS is oracle 8i. I add a new...
|
by: Jason |
last post by:
Is there any way to initiate a sqldatasource insert from code in place
of the button with commandname=insert or insert?
I have a formview with a datasource with an insert command on a
button....
|
by: jmacduff |
last post by:
Big question: How to enable edit/update commands to work when setting
the sqldatasource select command from code behind.
Details:
I have a GridView using a sqldatasouce with the select and...
|
by: dbrewerton |
last post by:
Ok everyone, when I do this update clause using code behind it gives me a stupid error that says:
Line: 6
Char: 62099
Error: Sys.WebForms.PageRequestManagerServerErrorException: Format of the...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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...
|
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: 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...
| |