looping thru table properties will I have to loop twice?

looping thru table properties will I have to loop twice?

Post by spark » Fri, 30 Jul 2004 01:23:45


I was going to loop thru the tables and change some properties.
10 <<<<<< prp.value --prp.name = Type
False <<<<prp.value --prp.name = allow zero length
10 <<<<<< prp.value --prp.name = Type
True <<<<prp.value --prp.name = allow zero length
10 <<<<<< prp.value --prp.name = Type
True <<<<prp.value --prp.name = allow zero length
10 <<<<<< prp.value --prp.name = Type
True <<<<prp.value --prp.name = allow zero length
4 <<<<<< prp.value --prp.name = Type
False <<<<prp.value --prp.name = allow zero length

so if the type is 10 --- text field
I want to change allow zero length to true on all of them
the type is 4 --number field has me messed up
it has the allow zero lenght and its set to false but you can't set it
to true on a number field.

they type is read before the allow zero lenght
so do I have to loop thru the properties twice?
check for 10 and then loop thru again and if its a 10 set allow zero
length to true?

thanks this should have been easier than I made it (I think)

jerry
 
 
 

looping thru table properties will I have to loop twice?

Post by Chuck Grim » Fri, 30 Jul 2004 02:36:52


You can look at a property without setting it, you know. You only
need to set it when you're going to have to *do* something to it.
This means that you can look at a different property then the one
you've set (or are about to set).

Another way to deal with this would be to trap the error, ignore it,
and move on.


<snip>


--
Ability Is A Good Thing But Stability Is Even Better.

 
 
 

looping thru table properties will I have to loop twice?

Post by spark » Fri, 30 Jul 2004 03:47:17

yep resume next is a life saver lol

thnks for the tip

jerry


On Wed, 28 Jul 2004 17:36:52 GMT, Chuck Grimsby
 
 
 

looping thru table properties will I have to loop twice?

Post by david epso » Fri, 30 Jul 2004 10:58:30

> Another way to deal with this would be to trap the error, ignore it,

In this particular situation it is likely to give you a memory leak
and slow recovery. Still, sometimes that is all you can do, and you
get the memory back when you release the database object.

(david)
 
 
 

looping thru table properties will I have to loop twice?

Post by Chuck Grim » Fri, 30 Jul 2004 23:55:45


???? I can't see how... When you try and set something to something
that you can't set it to, the result is the same as if you set the
object to nothing. In other words, no memory leak.

On Thu, 29 Jul 2004 11:58:30 +1000, "david epsom dot com dot au"








--
Friction Is A Drag.