473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Why are these two strings behaving differently?

M
Ok, I am calling a webservice by setting a string to an order id. For
some reason it only works when i hard code the value as a string
literal. No combination of .ToString() String.Copy, String.Concat,
etc works... it only works when the number is hard coded. Any ideas?

query string from browser:
http://localhost/shopfloor/goodsIssue.aspx?oId=1507923

goodsIssue.aspx.cs:
orderId =Request.QueryString["oId"]; //value is set correctly
invokeWebService(string orderId); //string is passed correctly

in web service invocation class:
public ZGetStglocStockZlgortstockRow[] InvokeImpl(string orderId){
ZGetStglocStockRequestBean req = new ZGetStglocStockRequestBean();
ZGetStglocStockZordersRow zOrder = new ZGetStglocStockZordersRow();
zOrder.order = "1507923"; //hard code works
//zOrder.order = orderId; /*this does not work even though
*orderId is 1507923 in the browser,
*and zOrder.order is "1507923" when i
*set a breakpoint and check the value in
VS.
*please help me.
*************************************/
int i = String.Compare(orderId,"1507923"); /*i returns 0...
*this mean they're the
same!!!
*********************/
}
Nov 15 '05 #1
0 724

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

Similar topics

11
by: Laurent Therond | last post by:
Maybe you have a minute to clarify the following matter... Consider: --- from cStringIO import StringIO def bencode_rec(x, b): t = type(x)
50
by: dataangel | last post by:
I wrote a function to compare whether two strings are "similar" because I'm using python to make a small text adventure engine and I want to it to be responsive to slight mispellings, like...
42
by: Rigga | last post by:
Hi all, I am wondering why string's are not true objects?.... Let me explain... If i write the code Dim x1 as String = "veg" Dim x2 as String = "veg" If x1 = x2 then
5
by: amit kumar | last post by:
I am calling a function which returns pointer to a map. The declaration of the map is map<int,vectxyz*>. vectxyz is a vector containing pointer to a class xyz. For map<int,vectxyz*>* p1 In the...
5
by: jason.evans | last post by:
Hi there. I am having an intrigueing problem. I have a query which left joins another query to itself twice. The original query is derived from a linked table in SQLServer 2000. When I run...
0
by: Mike | last post by:
can anyone explain to me why, given: decimal dec = 84.50M; Convert.ToInt32(dec).ToString() and Math.Round(dec,0).ToString() both correctly output "84"
7
by: Matthew Warren | last post by:
Hi, I would expect this to work, rawstring=r'some things\new things\some other things\' But it fails as the last backslash escapes the single quote. ...although writing this I think I...
9
by: ruffiano | last post by:
Hi, can someone tell me if a C++ string (std::string) represents a binary or an ASCII string? Thanks in advance.
74
by: cman | last post by:
Can you "walk across" C strings or char pointers (using *(sz+1)) like you can with arrays. If not, why not? If so, how? cman
4
by: vishwadeepsharma | last post by:
Hi Freinds, We are facing a very strange problem. Our system consists of UNIX batches which call the PLSQL procedures to execute the validations on the database. We have a list of plsql procedure...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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,...
0
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...
0
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,...
0
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...

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.