Paramter problems

D

Derek

Hi,

I'm having problems running an Access 2000 query.

The following query works fine if I run it within Access:
PARAMETERS [IN-NAME] Text ( 255 ), [IN-DESC] Text ( 255 );
UPDATE tbl_Maps SET tbl_Maps.map_desc = [IN-DESC]
WHERE ((([tbl_Maps].[map_name])=[IN-NAME]));

I'm trying to execute this from an ASP page using:
sqlUpdate = "EXECUTE MAP_U2 ('" & map_name
& "', 'Derek' )"
Conn.Execute(sqlUpdate)

At execution the variable sqlUpdate contains
EXECUTE MAP_U2 ('GF', 'Derek' )

When I run this from my ASP page I get the error:
Microsoft JET Database Engine:
Syntax error in parameters clause.
Make sure the parameter exists and that you typed its
value correctly.

This looks like it should be pretty obvious but I can't
spot the error. Any help would be appreciated.

Thanks

Derek
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The command "EXECUTE MAP_U2 ('GF', 'Derek' )" is the command to execute
a stored procedure (sp) named "MAP_U2." Your example query is an DAO
QueryDef. These are two different things. SPs are in RDBMS servers (MS
SQL Server, Oracle, Interbase, etc.).

As far as I know you can't directly run a PARAMETERS query
(DAO.QueryDef) from an .ASP page. It probably could be run thru CGI and
an Access VBA routine.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQSEV/4echKqOuFEgEQKvugCghtrBCxFIahOMTqLjNEHhzKzu5KsAoIOx
VzAcfTp3xl5iVBPJG98f2vq4
=B6uz
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top