473,486 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing XML DoubleQuotes to Sproc

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:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geonames style="FULL">
<totalResultsCount>3</totalResultsCount>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196</lat>
<lng>-118.1503488</lng>
<geonameId>5397717</geonameId>
<countryCode>US</countryCode>
<countryName>United States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city, village,...</fclName>
<fcodeName>populated place</fcodeName>
<population>24994</population>
<alternateNames/>
<elevation>201</elevation>
<adminCode1>CA</adminCode1>
<adminName1>California</adminName1>
<adminCode2>037</adminCode2>
<adminName2>Los Angeles County</adminName2>
<timezone dstOffset="-7.0" gmtOffset="-8.0">America/Los_Angeles</
timezone>
</geoname>
</geonames>
Jan 7 '08 #1
2 1592
On Jan 7, 5:42 pm, Lauren Quantrell <laurenquantr...@hotmail.com>
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:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geonames style="FULL">
<totalResultsCount>3</totalResultsCount>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196</lat>
<lng>-118.1503488</lng>
<geonameId>5397717</geonameId>
<countryCode>US</countryCode>
<countryName>United States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city, village,...</fclName>
<fcodeName>populated place</fcodeName>
<population>24994</population>
<alternateNames/>
<elevation>201</elevation>
<adminCode1>CA</adminCode1>
<adminName1>California</adminName1>
<adminCode2>037</adminCode2>
<adminName2>Los Angeles County</adminName2>
<timezone dstOffset="-7.0" gmtOffset="-8.0">America/Los_Angeles</
timezone>
</geoname>
</geonames>
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.
Jan 8 '08 #2
On Jan 7, 9:14*pm, lyle <lyle.fairfi...@gmail.comwrote:
On Jan 7, 5:42 pm, Lauren Quantrell <laurenquantr...@hotmail.com>
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:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geonames style="FULL">
<totalResultsCount>3</totalResultsCount>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196</lat>
<lng>-118.1503488</lng>
<geonameId>5397717</geonameId>
<countryCode>US</countryCode>
<countryName>United States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city, village,...</fclName>
<fcodeName>populated place</fcodeName>
<population>24994</population>
<alternateNames/>
<elevation>201</elevation>
<adminCode1>CA</adminCode1>
<adminName1>California</adminName1>
<adminCode2>037</adminCode2>
<adminName2>Los Angeles County</adminName2>
<timezone dstOffset="-7.0" gmtOffset="-8.0">America/Los_Angeles</
timezone>
</geoname>
</geonames>

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.- 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 =
FunctionNameThatCallsWebServiceAsXMLString(params)

Set RS = CurrentProject.Connection.Execute("EXEC " & mySprocName & "
'" & myWebServiceReturn & "'")
Me.ComboBox.RowSource = RS.Source
Jan 8 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5422
by: Aaron | last post by:
The following code works fine when previewing a Crystal report using ASP, EXCEPT when it gets to a report using a SubReport and its associated parameters. The whole report just comes up blank with...
6
6723
by: mirza i | last post by:
in asp i have this line: ..... Set paramsx = cmdUpdatex.CreateParameter ("@invdate", addate, adParamInput, 50, invdate) cmdUpdatex.Parameters.Append paramsx ... (the invdate value is a...
1
2029
by: teddysnips | last post by:
SQL Server 2000 I have a stored procedure that uses an extended SPROC to send an email notification to my customers when a document is distributed. However, the SPROC has an unexpected side...
3
4820
by: Radu | last post by:
Hi. I have lots of processing to do on the server - from the client (Access) I call a sproc which returns a recordset (the sproc is essentially a big "select"). With the obtained data , I need to...
1
2641
by: a | last post by:
I'm trying to pass an xml file as a variable of type string to an OpenXML stored procedure, but the code below fails at the "sCmd01.ExecuteNonQuery();" line. The SPROC is working fine in Query...
1
13612
by: John Hoge | last post by:
Is it possible to pass a null value to a stored procedure in .net? I have a search Sproc that can take one of two numbers to search on, but not both. I use the code below to pass a null value to...
9
1895
by: orenr | last post by:
Hi We have a web site for 100 users using SQL Server. In our DAL all the selections when we need to pass parameters are using the SqlCommand and they are something like: SqlCommand com = new...
0
2845
by: ZRexRider | last post by:
Hi, I've written reports based on stored procedures that receive parameters and it usually seems straight forward. Today I would like to use Crystal Reports parameter interface t prompt for a...
0
1164
by: seevion | last post by:
My first post (beginner).. I hope it is clear enough and appreciate your taking the time to consider helping. I have an existing sproc that takes a cart transaction from a table and inserts shared...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.