Avatar of grantballantyne
grantballantyneFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Update Command Syntax

Dear Experts

I have the following update command:

'Set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_bspc_database_STRING
Command2.CommandText = "Update Property_Street_View set pSVlive = 'Y' "
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()

Set Command2 = Nothing'


I would like to update the pSVlive to Y ONLY where another the field 'pMemberCode' is equal to a form variable that is posted from the previous page.

Can anyone suggest on the syntax to achieve this ?

Many thanks for any help.
ASPWeb Languages and StandardsAdobe Dreamweaver

Avatar of undefined
Last Comment
grantballantyne
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of grantballantyne

ASKER

Thanks for this suggestion - the member code is char (10)

will this work:

Command..Parameters.Append  .CreateParameter( "pMemberCode", adChar, adParamInput, 10, Request.Form("pMemberCode") )

thanks
Avatar of grantballantyne

ASKER

Hi - I tried the following and got an error - 'Cannot use parentheses when calling a Sub

/membersarea/propertylist_SV_confirm.asp, line 63

Command.Parameters.Append.CreateParameter( "pSVMemberCode", adChar, adParamInput, 10, Request.Form("MemCode") )'

any suggestions?

Thanks
ASP
ASP

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

82K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo