473,763 Members | 5,412 Online
Bytes | Software Development & Data Engineering Community
+ 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">
<totalResultsCo unt>3</totalResultsCou nt>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196 </lat>
<lng>-118.1503488</lng>
<geonameId>5397 717</geonameId>
<countryCode>US </countryCode>
<countryName>Un ited States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city , village,...</fclName>
<fcodeName>popu lated place</fcodeName>
<population>249 94</population>
<alternateNam es/>
<elevation>20 1</elevation>
<adminCode1>C A</adminCode1>
<adminName1>Cal ifornia</adminName1>
<adminCode2>037 </adminCode2>
<adminName2>L os Angeles County</adminName2>
<timezone dstOffset="-7.0" gmtOffset="-8.0">America/Los_Angeles</
timezone>
</geoname>
</geonames>
Jan 7 '08 #1
2 1617
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">
<totalResultsCo unt>3</totalResultsCou nt>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196 </lat>
<lng>-118.1503488</lng>
<geonameId>5397 717</geonameId>
<countryCode>US </countryCode>
<countryName>Un ited States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city , village,...</fclName>
<fcodeName>popu lated place</fcodeName>
<population>249 94</population>
<alternateNam es/>
<elevation>20 1</elevation>
<adminCode1>C A</adminCode1>
<adminName1>Cal ifornia</adminName1>
<adminCode2>037 </adminCode2>
<adminName2>L os 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
.ActiveConnecti on = CurrentProject. Connection
.CommandType = adCmdStoredProc
.CommandText = "StoredProcedur e2"
Set p = .CreateParamete r("@SomeString" , adVarChar, adParamInput,
2000, msXml.ResponseT ext)
.Parameters.App end p
End With

In this case, msXml.ResponseT ext 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">
<totalResultsCo unt>3</totalResultsCou nt>
<geoname>
<name>South Pasadena</name>
<lat>34.1161196 </lat>
<lng>-118.1503488</lng>
<geonameId>5397 717</geonameId>
<countryCode>US </countryCode>
<countryName>Un ited States</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<fclName>city , village,...</fclName>
<fcodeName>popu lated place</fcodeName>
<population>249 94</population>
<alternateNam es/>
<elevation>20 1</elevation>
<adminCode1>C A</adminCode1>
<adminName1>Cal ifornia</adminName1>
<adminCode2>037 </adminCode2>
<adminName2>L os 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
* * .ActiveConnecti on = CurrentProject. Connection
* * .CommandType = adCmdStoredProc
* * .CommandText = "StoredProcedur e2"
* * Set p = .CreateParamete r("@SomeString" , adVarChar, adParamInput,
2000, msXml.ResponseT ext)
* * .Parameters.App end p
End With

In this case, msXml.ResponseT ext points to the string.- Hide quoted text -

- Show quoted text -
I see now. I was trying it with a declared string value:

Dim myWebServiceRet urn as string
Dim RS As Recordset
Dim mySprocName as string

myWebServiceRet urn =
FunctionNameTha tCallsWebServic eAsXMLString(pa rams)

Set RS = CurrentProject. Connection.Exec ute("EXEC " & mySprocName & "
'" & myWebServiceRet urn & "'")
Me.ComboBox.Row Source = RS.Source
Jan 8 '08 #3

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

Similar topics

0
5442
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 this error message: "The Error Message was: Error detected by database DLL.from: Crystal Reports ActiveX Designer". What am I doing wrong in the SubReport section below and how do I properly pass in sproc params to the subreport? Thanks. ...
6
6739
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 dd/mm/yyyy date) AND in sql server 2000 sp i have:
1
2047
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 effect. If I run it in its current incarnation, it only sends one email and then exits. However, if I remove or comment out the block
3
4836
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 generate a report. How do I set the Recordsource of the report to the result of the select sproc ? I have tried the following, but it does not work. Private Sub cmdReport_Click()
1
2653
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 Analyzer. Anyone know how to make this work? Thanks, Paul
1
13631
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 the sproc if a TextBox is empty. SqlCommand getLesNumbers = new SqlCommand(); getLesNumbers.CommandText="usp_getLesNumbers"; getLesNumbers.CommandType = CommandType.StoredProcedure; getLesNumbers.Connection = msoConn;
9
1907
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 SqlCommand(); com.Connection = MyConnection; com.Transaction = MyTransaction; com.CommandText = ""SELECT CustomerID, CompanyName FROM Customers "
0
2855
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 "Date Range" and then pass the lower and upper date values to the @StartDate and @EndDate of my SPROC's range. Unfortunately when I try to build a report off of a SPROC havng two
0
1176
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 values of that transaction into another table called Transaction_PT. The sproc works fine, it takes the total sale value and attributes profit share of that value to participating members. Now I need to modify this sproc to also look up the...
0
10144
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2793
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.