Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm working customer database project. Front end is vb.net and back end is ms access.

I could work product id can generate automatically. In this id contain first letter of customer and first two letter in product type continues numeric.

Example: customer name- stalin, product type- dell in this case product id can generate "sde001". I want help how to retrieve this two string?
Posted
Updated 31-Oct-11 0:16am
v2

1 solution

you can use substring for this. example:

VB
Dim x As String = "I am me"

'This is the Left : Result "I"
Debug.WriteLine(x.Substring(0, 1))

'This is the Mid : Result "am"
Debug.WriteLine(x.Substring(2, 2))

'This is the Right : Result "me"
Debug.WriteLine(x.Substring(x.Length - 2, 2))


http://forums.devx.com/showthread.php?threadid=175478[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900