Solved

ASP - Question about some code

Posted on 2013-12-05
4
285 Views
Last Modified: 2013-12-05
I just need this small portion defined - I know it has to do with the position of the value in the field "TYP" but could use a little more of a clear definition.

            typ1 = left(rsData.Fields("TYP"), 1)
            typ2 = mid(rsData.Fields("TYP"), 2, 1)
            typ3 = right(rsData.Fields("TYP"), 1)


Thanks!
0
Comment
Question by:JohnMac328
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 39698981
what are the results you're looking for?
0
 

Author Comment

by:JohnMac328
ID: 39698992
This code was sent to another company since they are taking over the department.  I just need to explain what it is doing - here is an example of a value in the typ field

30D
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39699012
ok, easy enough:

'-- sets typ1 variable to the first charactor in rsData.Fields("TYP")
typ1 = left(rsData.Fields("TYP"), 1)            

'-- sets typ2 variable to the 2nd charactor in rsData.Fields("TYP"), it uses the MID function, which requires a starting point in the string and length of how many charactors you want to parse out. since the starting value is 2, it would start at the 2nd charactor and then length would be 1 (the 3rd parameter)
typ2 = mid(rsData.Fields("TYP"), 2, 1)

'-- sets typ3 variable to the last charactor in rsData.Fields("TYP")
typ3 = right(rsData.Fields("TYP"), 1)
0
 

Author Closing Comment

by:JohnMac328
ID: 39699014
Great thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question