Access VBA SQL Stored Procedure error.
I can run this on the server:
Update TransactionCode Set ParameterXML = '<StockTake xmlns:xsd="
http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocat
ion="INVTS
CDOC.XSD">
<Key><Ware
houseCode>
XX</Wareho
useCode></
Key><Optio
n><CreateB
ins>N</Cre
ateBins><C
reateSeria
ls>N</Crea
teSerials>
<CreateLot
s>N</Creat
eLots><Val
idateRetur
nsAll>N</V
alidateRet
urnsAll><V
alidateOnl
y>N</Valid
ateOnly><I
gnoreOther
WhsItems>Y
</IgnoreOt
herWhsItem
s><Capture
TicketNumb
ers>N</Cap
tureTicket
Numbers><T
icketNumbe
rsExist>N<
/TicketNum
bersExist>
<DefaultCa
ptureMetho
d>I</Defau
ltCaptureM
ethod><Xsl
Stylesheet
/></Option
></StockTa
ke>' Where TransCodeID = 23
When I run this in Access:
SQLUpdate = "Update TransactionCode Set ParameterXML = '" & XMLstr & "' Where TransCodeID = 23"
objCmd.CommandText = "Exec usp_ExecuteSQL" & " '""" & SQLUpdate & """'"
objCmd.ActiveConnection = adoConn_Dataswitch
Set objRs = objCmd.Execute
I get "Incorrect syntax near '<' "
Can anyone help?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.