473,395 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

invalid user.table.column

Using the below method,

<%
remaining_stock = cint(product_stock) - cint(chQuantity)
%>

<%
sqlString = "UPDATE Products SET " &_
"product_stock='" & remaining_stock & "'," &_
"WHERE product_id='" &chID& "'"

Conn.execute sqlString
%>
i keep getting the error : invalid user.table.column, table.column, or column specification. sigh what's wrong?
if i use response.write, i do get what i want, which is

UPDATE Products SET product_stock='49',WHERE product_id='1'

My products table looks like this.

Create table Products(
product_id INTEGER not null unique,
product_name VARCHAR(50),
product_price REAL,
product_description VARCHAR(3000),
product_category VARCHAR(30),
product_subcategory VARCHAR(30),
product_stock INTEGER,
product_image VARCHAR(50),
product_status INTEGER,
product_featured INTEGER,
PRIMARY KEY (product_id)
);

Does it have anything to do with the fields being set to an integer?

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Jul 19 '05 #1
1 3220
Michelle wrote:
Using the below method,

<%
remaining_stock = cint(product_stock) - cint(chQuantity)
%>

<%
sqlString = "UPDATE Products SET " &_
"product_stock='" & remaining_stock & "'," &_
"WHERE product_id='" &chID& "'"

Conn.execute sqlString
%>
i keep getting the error : invalid user.table.column, table.column,
or column specification. sigh what's wrong? if i use response.write,
i do get what i want, which is

UPDATE Products SET product_stock='49',WHERE product_id='1'


This should not be what you want. The comma before the WHERE keyword is
making this statement invalid. The query engine is expecting you to name
another column to be updated after that comma. This should be what you want:

UPDATE Products SET product_stock='49' WHERE product_id='1'
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
When I execute the following (with an OleDBDataAdapter), wanting to add a row to a visual foxpro table: myrow= datasetTarget.Tables(0).NewRow 'fill all columns here like.. row(i)= myvalue '...
8
by: Shino | last post by:
Hi, Can anyone help with this error: "ORA-00904: invalid column name"? Thanks! SQL> create view PPFa as 2 SELECT L.UserID AS LecID, U.Name, U.Email, I.IntakeID, S.UserID AS StudID 3 FROM...
4
by: rawheiser | last post by:
Behavior I found: Invalid Column name in select embedded in a IN() clause appears to return a NULL, and fails silently - completing the query giving incorrect results. Behavior I expected: ...
4
by: Kumar | last post by:
Need urgent help.... I wanted update one table which has a primary key and also has few dependents. I dropped Primary key before update sothat it won't affect the dependent tables. After...
4
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView...
6
by: Thomas Mueller | last post by:
Hi, I tried to install phpopenchat but I can't create this table: poc=> CREATE TABLE poc_user_account ( poc(> USER varchar(255) NOT NULL, poc(> PASSWORD varchar(255), poc(> ...
0
by: na123 | last post by:
hello all, i want to share my problem with u all.my problem is i ve created two tables the primary key of one table is the foreign key of the other table. when i did select statement to show...
7
by: jknaty | last post by:
I'm trying to create a function that splits up a column by spaces, and I thought creating a function that finds the spaces with CHARINDEX and then SUBSTRING on those values would an approach. I...
9
by: mark4asp | last post by:
Why is this page invalid? Pasted into http://validator.w3.org/ I'm told that the page is invalid. Why? It flags problems with the <bodyand </htmltags but I can't see why. Is the W3C validator...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.