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

Home Posts Topics Members FAQ

preceding zero truncated

Hi all,

I'm a newbie in VB2005. I have a trouble getting text from textbox and
combobox.SelectedValue. The values reside on two controls are text.
But they are in numeric text eg. product code '006700'. When I got
these texts, the preceding zero was truncated to '6700'. How can I get
the text '006700'.

Thank you in advance.
Krung

Aug 10 '07 #1
2 1612
sa*******@lycosasia.com wrote:
I'm a newbie in VB2005. I have a trouble getting text from textbox and
combobox.SelectedValue. The values reside on two controls are text.
But they are in numeric text eg. product code '006700'. When I got
these texts, the preceding zero was truncated to '6700'. How can I get
the text '006700'.
By getting it as a string and keep it that way. If you convert it to a
number, leading zeroes will be lost.

--
Göran Andersson
_____
http://www.guffa.com
Aug 10 '07 #2
Krung

Maybe I don't understand your question, of course has every numeric value no
preceding zeros, however as you want preceding zeros in a string then,

Padleft

http://msdn2.microsoft.com/en-us/library/92h5dc07.aspx

Cor

<sa*******@lycosasia.comschreef in bericht
news:11**********************@e16g2000pri.googlegr oups.com...
Hi all,

I'm a newbie in VB2005. I have a trouble getting text from textbox and
combobox.SelectedValue. The values reside on two controls are text.
But they are in numeric text eg. product code '006700'. When I got
these texts, the preceding zero was truncated to '6700'. How can I get
the text '006700'.

Thank you in advance.
Krung

Aug 10 '07 #3

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

Similar topics

3
by: yanir | last post by:
Hi I use reponse.contenttype = "application/vnd.ms-excel" So the browser will show the data in excel format, but for some fields I use leading zero's, which truncated by the browser, at this...
5
by: Jay Chan | last post by:
The transaction log in a database in our SQLSERVER-2000 server has grown to 16GB. I cannot shrink the transaction log manually because it says that the entire 16GB log size is not free. This is...
2
by: Sven | last post by:
Hi I have the following XML & XSLT: XML: <?xml version="1.0" encoding="utf-8"?> <Source Source="IBM"> <Detail> <UserID></UserID>
2
by: KJ | last post by:
Hello All, I'd like to know what the difference is between these 2 expressions: parent::*/preceding-sib­ling::tagname VS parent::preceding-sib­ling::tagname
53
by: Zhiqiang Ye | last post by:
Hi, All I am reading FAQ of this group. I have a question about this: http://www.eskimo.com/~scs/C-faq/q7.31.html It says: " p = malloc(m * n); memset(p, 0, m * n); The zero fill is...
5
by: z. f. | last post by:
hi, i have a vb.net web application and i make a request using internet explorer to an aspx page. the aspx page size if over 170KB, and the page in internet explorer looks truncated and in the...
6
by: John | last post by:
Hi I would like to convert a number to string but with a preceding zero if the number is less than 10. How can I accomplish this? Thanks Regards
2
by: scott s | last post by:
Hello all, I was just awarded the job of maintaing the database server for our company. I have basically ZERO experience using MS SQL Server 2000. Can anyone point me in the direction of a good...
1
by: rnakawat | last post by:
I seem to have a problem using the preceding:: on substrings of the value. I'll try to explain with an example: Let's say I had a XML that look like: <Root> <Row> <Cell Name="Street"...
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
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...
1
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.