Re: Integer?

2000-04-11 Thread Alexander Lamon

Use the IsNumeric function to test for a number value, then perform your 
MOD stuff


>Hopefully someone can shed some light on this. I've got a field where I'm
>looking for an integer. I then need to verify that this field is in an
>increment of 100:
>
>
>   It's not an increment of 100!
>
>
>Alrighty, that works fine, unless I enter a non-integer in the field (i.e.
>"01234567890", even though CFFORM validates this as an integer!) 
>
>My first thought here is to use the Int() function to round this to the
>nearest integer:
>
>
>   It's not an increment of 100!
>
>
>BUT NO! This does not work as advertised. I'm still getting a "Cannot
>convert to integer" from the Mod operator. Is anyone out there dealing with
>validating a user's input as an integer? Suggestions?
>
>
>Jason Stiefel
>Applications Developer
>iXL, Inc.
>1930 Camden Road, Suite 2070
>Charlotte, NC 28203
>tel. 704.943.7000
>fax. 704.943.7001
>[EMAIL PROTECTED]
> 
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Evaluate('Form.field#sub#')

2000-04-10 Thread Alexander Lamon

You don't need the Evaluate() in the IsDefined() portion, just in the 
Len():




>OK .. now I have this:
>
>Len(Evaluate(Form.txtPaymentAmount#contact_id#))>
>
>and I'm getting:
>
>-
>Just in time compilation error
>
>Invalid parser construct found on line 27 at position 32. ColdFusion was
>looking at the following text:
>
>Form.txtPaymentAmount
>
>Invalid expression format. The usual cause is an error in the expression
>structure.
>
>-
>
>I have tried it with and without quotes.
>
>Todd
>
>- Original Message -
>From: "Alexander Lamon" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, April 10, 2000 11:19 AM
>Subject: Re: Evaluate('Form.field#sub#')
>
>
>> Instead of  try using > Len(Evaluate(Form.txtField#primary_key#))>
>>
>> Using Len is faster than using 'IS NOT ""' and I think you need to use
>> EVALUATE to test for an empty string in this case.
>
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Evaluate('Form.field#sub#')

2000-04-10 Thread Alexander Lamon

Instead of  try using   

Using Len is faster than using 'IS NOT ""' and I think you need to use 
EVALUATE to test for an empty string in this case.


>I am trying to check for the existance of a dynamic Form.Field.  The actual
>name of the form field is found by looping through a query and appending the
>primary key to the end of the name:
>
>name = "txtField#primary_key#"
>
>On the form handler page, I have something like this:
>
>IS NOT "">
>Do my stuff
>
>
>The problem I have is, even when I leave the form field blank and submit the
>form, it still does "Do my stuff", but returns an error saying that it can't
>find a value for
>#Evaluate('Form.txtField#primary_key#')#
>So that means it's passing the CFIF statement even though it shouldn't be.
>
>If I eneter a value, it works perfectly fine.  Any ideas?
>
>Todd Ashworth
>
>Saber Corporation
>Web Application Development
>www.sabersite.com
>(803) 327-0137 [111]
>(803) 328-2868 (fax)
>
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Know of a CF app that tracks employee training?

2000-04-05 Thread Alexander Lamon

Check out Training Server from Syscom. It has a CF web interface going up 
against your choice of SQL or Oracle.  It's pretty pricey, tho.


>Does anyone know of an application that has already been developed in
>ColdFusion that can track employee training, schedule courses, etc.?  I'm
>trying to decide if I should develop one or purchase one if there's a good
>one out there.
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: FindNoCase Function

2000-03-29 Thread Alexander Lamon

Sherry,

How 'bout converting both sides of the WHERE clause to all upper (or 
lower) case?  Might be simpler way of bypassing case-sensitivity e.g.

SELECT *
 from aTable
  where upper(proj_name) LIKE '%#UCase(projcontains)#%';



>
>SELECT *
>FROM pwcntrct
>
>...various other CFIF statements
>
>
>   WHERE proj_name LIKE '%#FindNoCase(projcontains, projcontains)#%'
>
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: query to textfile

2000-03-29 Thread Alexander Lamon

You can do it two ways:

1) Schedule a page to create the text file at a certain time interval and 
then link to that file. (Only updated every so often.)

2) Have the user hit a page that runs a query and uses CFCONTENT based on 
that query to download the file to the user. (Always the freshest version 
of the data.)



>Any way to do this?
>
>1)do a query.
>
>2)cfoutput the query to a text file.
>
>3)have the user DL the text file
>
>Won Lee
>Systems Consultant
>New Channel Technologies
>(330) 220-1558
>[EMAIL PROTECTED]
>
>"Turning ideas into e-Business"
> Premier Partner
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: kill the session variables when browser is close.

2000-03-28 Thread Alexander Lamon

To kill session vars upon browser close:


  
  
  
  


Just put it in your application.cfm file.



>Hi,
>
>there was a post to show how to kill the session variables when user close
>browser.
>I can not find it, does any one know how to kill the session variables when
>user close browser.
>The post was show how to kill the session variables in application.cfm
>
>Thank you very much
>
>
>Yungchih
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: display all session variables

2000-03-27 Thread Alexander Lamon

Jeff,

Session and application variables and can be accessed using the Struct 
functions.  To see all of the session variables for an application, you 
can do something like this:



 #variable# = #StructFind(session, "#variable#")# 


 I use this kind of thing to see who's on a few of my sites and where 
they are.



>I know I've seen this, but after two hours of searching, I'm giving up :-)
>
>I want to do a "who's on" listing, and display all of the instances of
>session.username that currently exist.
>
>Isn't there a way to get all of the session variables, not on a per user
>basis, but for all users with active sessions?
>
>I have session.username and session.lastdatetime being set (among others).
>How can I list all of the instances of session.username and
>session.lastdatetime?
>
>TIA!
>
>Jeff
>
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: CF Based Real Estate App

2000-03-27 Thread Alexander Lamon

Check the Allaire site.  I think the Custom Tags and Applications contain 
a couple of CF-based real estate apps.

Good luck.


>Howdy,
>
>A client wants to re-create a realtors.com-type app
>for a particular region. They want a site where
>realtors can enter real-estate information, and buyers
>can view local real estate. Any pre-packaged CF apps
>out there with this type of functionality? Probably
>fairly straightforward, but no sense re-inventing the
>wheel!
>
>Thanks!
>
>
>__
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
>http://im.yahoo.com
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Password protected directories

2000-03-27 Thread Alexander Lamon

Robert,

Are the primary keys you refer to below consecutive *and* contiguous?  If 
so, you can do something like this:



 select article from someTable;







select article from someTable
where ID = #randomID#;


*However*, if you have gaps in the numbers like 1,2,3,7, this won't work 
for obvious reasons.

Hope this helps,

Alec Lamon
IT Manager
Wharton Direct


>   Ok here is my problem, I have a database that has news articles. Now what
>my boss wants me to do is make it so the first feature story you see on the
>page is different each time you come on. It can be random and it can loop
>over once you have seen all the feature articles. The problem is the only
>unique field is the autonumber field so the feature articles could be
>15,18,34,48,78. How would I be able to make it so each article is different.
>Anyone have something they have already done that I could use or modify?
>
>Robert Everland III
>Network Administrator
>Orlando.com
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Ordering a list

2000-03-27 Thread Alexander Lamon

James,

Try the ListSort() function.  You can sort alpha and numeric list values 
in ascending or descending order before you run your output.



>Any way to order a list easily???
>
>Say I have a LIST and I want it alphabetized?
>
>I am looping thry the list and would like to have some contro over the
>display order...
>
>thanks
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Strange error - any ideas?

2000-03-24 Thread Alexander Lamon

Joel,

It's definitely a locking issue. I'll bet there's an Access .ldb file in 
the same directory as your database file when this happens.  I ran into 
this myself. Access started to lock my DB file all by itself.  Turns out 
that the database had grown beyond Access capabilities and I had to move 
to an enterprise platform (Oracle)  If the cause is not someone 
physically having the database file open, you might want to check the 
integrity of your Access file.




>Everyone:
>
>I got this error today. It just started. And I haven't a clue why. Here's
>what I get:
>
>ODBC Error Code = S1000 (General error)
>
>[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database
>engine stopped the process because you and another user are attempting to
>change the same data at the same time.
>
>And here's the code:
>
>
>select * from JobApps
>
>
>It doesn't get much simpler then that. I appreciate your input. And there
>are no files included.
>Just this and a  statement.
>
>Thanks.
>
>===
>Joel Firestone - Developer
>Delmarva Online
>http://www.dmv.com/
>
>
>--
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.