Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query help - Update record. 2 few parameters!!??!

Status
Not open for further replies.

craiogram

MIS
Feb 20, 2004
126
US
I have this query to upate a table from my ASP page. The table has 10 rows and 11 cols (RowNum, col1 thru col10
Code:
Query = "UPDATE poolTB SET RowNum=1, col1=A1, col2=A1, col3=A1, col4=A1, col5=A1, col6=A1, col7=A1, col8=A1, col9=A1, col10=A1 WHERE RowNum=" & rowCount

I've taken a look at it by doing request.write(Query) but it looks fine. HOWEVER I still get this error: Too few parameters. Expected 1.

Can anybody shed a little light for me? Thank you MUCH, in advance.
 
What i suspect here is that you are using keywords rownum and rowcount...

try this:

Query = "UPDATE poolTB SET [RowNum]=1, col1=A1, col2=A1, col3=A1, col4=A1, col5=A1, col6=A1, col7=A1, col8=A1, col9=A1, col10=A1 WHERE [RowNum]=" & rowCount1

also change the rowcount to rowcount1 or something else as i have shown abovee...

-DNG
 
What is that A1? If it is a variable make sure it is defined somewhere, if it is supposed to be a string you need some single quotes around it.
Usually the easiest way to find the issue with SQL errors is to drop them in query analyzer and see what blows up.

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top