[thelist] ASP error: Too few parameters.

Gebreselassie Johnny gebreselassie_johnny at bah.com
Thu May 17 13:06:55 CDT 2001


too few parameters means just that you have too few parameters.  You should
be able to do an update with two tables open so I don't think that is the
problem.  (I have never used asp though so it could be)  I imagine the
problem is either in your query or in your code that you are missing a field
or variable.  I would just go back count the number of fields that you are
selecting the number that you are updating make sure that they match.

Update Table ('field1', 'field2', ...
select field1, field2 ...

also if you are passing this data using asp you must have an array somewhere
and I suspect that this is where you are either missing a parameter, or it
could be that you are passing an empty string probably the latter.  If one
of your fields that your selecting is null your array could be missing a
parameter.

the quick and dirty way to cure this is to check the variable that your
returning and if it null to assign it some dummy value.

if ($first == null) {
	then $first = " ";
)

the only thing about doing things this way is that your database might not
return this field if your doing a select against a null value.  You could
correct this by then running a simple update query against the table where
you set the fields = " " to null.

Hope this helps

Johnny Gebreselassie

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Herrick, Emma
Sent: Thursday, May 17, 2001 1:53 PM
To: thelist at lists.evolt.org
Subject: [thelist] ASP error: Too few parameters.


Does anyone know what this error means?

Too few parameters. Expected 9.

I get it on my sql statement which works fine if I run it in access, but not
through ASP. 9 is the number of fields I'm retrieving from 2 tables. Is it
because I'm trying to do an update on one table with 2 tables open? Am I not
allowed to do that in ASP?

I've looked the error up on MS but none of the examples seems to apply to my
issue.

TIA!

Emma

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list