Passing XML DoubleQuotes to Sproc
am 07.01.2008 23:42:54 von laurenq uantrell
I can pass the XML below to a sproc from within a vb.net application
but it doesn't work to the same sproc from an Access application.
I've tried massaging the double quotes without success. Any help is
appreciated.
lq
XML text:
3
South Pasadena
34.1161196
-118.1503488
5397717
US
United States
P
PPL
city, village,...
populated place
24994
201
CA
California
037
Los Angeles County
America/Los_Angeles
timezone>
Re: Passing XML DoubleQuotes to Sproc
am 08.01.2008 03:14:59 von lyle
On Jan 7, 5:42 pm, Lauren Quantrell
wrote:
> I can pass the XML below to a sproc from within a vb.net application
> but it doesn't work to the same sproc from an Access application.
>
> I've tried massaging the double quotes without success. Any help is
> appreciated.
>
> lq
>
> XML text:
>
>
>
> 3
>
> South Pasadena
> 34.1161196
> -118.1503488
> 5397717
> US
> United States
> P
> PPL
> city, village,...
> populated place
> 24994
>
> 201
> CA
> California
> 037
> Los Angeles County
> America/Los_Angeles
> timezone>
>
>
Are you using a variable pointing to the string?
Are you using an ado command object and a parameter?
I believe that you will be successful if you do.
eg
With m
.ActiveConnection = CurrentProject.Connection
.CommandType = adCmdStoredProc
.CommandText = "StoredProcedure2"
Set p = .CreateParameter("@SomeString", adVarChar, adParamInput,
2000, msXml.ResponseText)
.Parameters.Append p
End With
In this case, msXml.ResponseText points to the string.
Re: Passing XML DoubleQuotes to Sproc
am 08.01.2008 04:10:36 von laurenq uantrell
On Jan 7, 9:14=A0pm, lyle wrote:
> On Jan 7, 5:42 pm, Lauren Quantrell
> wrote:
>
>
>
>
>
> > I can pass the XML below to a sproc from within a vb.net application
> > but it doesn't work to the same sproc from an Access application.
>
> > I've tried massaging the double quotes without success. Any help is
> > appreciated.
>
> > lq
>
> > XML text:
>
> >
> >
> > 3
> >
> > South Pasadena
> > 34.1161196
> > -118.1503488
> > 5397717
> > US
> > United States
> > P
> > PPL
> > city, village,...
> > populated place
> > 24994
> >
> > 201
> > CA
> > California
> > 037
> > Los Angeles County
> > America/Los_Angeles
> > timezone>
> >
> >
>
> Are you using a variable pointing to the string?
> Are you using an ado command object and a parameter?
> I believe that you will be successful if you do.
>
> eg
>
> With m
> =A0 =A0 .ActiveConnection =3D CurrentProject.Connection
> =A0 =A0 .CommandType =3D adCmdStoredProc
> =A0 =A0 .CommandText =3D "StoredProcedure2"
> =A0 =A0 Set p =3D .CreateParameter("@SomeString", adVarChar, adParamInput,=
> 2000, msXml.ResponseText)
> =A0 =A0 .Parameters.Append p
> End With
>
> In this case, msXml.ResponseText points to the string.- Hide quoted text -=
>
> - Show quoted text -
I see now. I was trying it with a declared string value:
Dim myWebServiceReturn as string
Dim RS As Recordset
Dim mySprocName as string
myWebServiceReturn =3D
FunctionNameThatCallsWebServiceAsXMLString(params)
Set RS =3D CurrentProject.Connection.Execute("EXEC " & mySprocName & "
'" & myWebServiceReturn & "'")
Me.ComboBox.RowSource =3D RS.Source