Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

probably simple question

I'm looking at some VB code at work that contains (among others) this piece:

With oRS
 If Not (.EOF And .BOF) Then
   Do While Not .EOF
   lTaskID = !TaskID
... etc.

My question: what in the world do the "!" mean in there?
0
gsn
Asked:
gsn
  • 2
  • 2
  • 2
  • +2
1 Solution
 
bobbit31Commented:
!TaskID means that TaskID is a field in the recordset (oRS)
0
 
bobbit31Commented:
so basically ITaskID = the value of TaskID field
0
 
TimCotteeCommented:
The ! syntax refers to the fields collection of the recordset, this could equally be represented as:

ITaskID = .Fields("TaskID").Value

It is recommended to use the full syntax as the ! syntax forces the code to evaluate the line then convert it internally as above and then get the result. However in reality the time taken to do this is very small and has little to no impact.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
gsnAuthor Commented:
yeah, I understand that... sorry, should have made myself clear: what's the difference between "." and "!" in that regard.
0
 
BahnassCommented:
TaskID is a field in oRS Recordset

With oRS makes    !TaskID translated into
oRS!TaskID

Hope it is clear
0
 
Éric MoreauSenior .Net ConsultantCommented:
the ! in this case is called the Bang operator.

you could have wrote:
lTaskID = .fields("TaskID").value
0
 
BahnassCommented:
Hi Tim again

No I'm abad typist !!!!
0
 
gsnAuthor Commented:
thanks for the prompt answer!!
0

Featured Post

Independent Software Vendors: 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!

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now