arrgh 22 Posting Whiz

No, I didn't mean you had to post the results. Just asking if you tried the basic troubleshooting techniques I mentioned. Since cfselect's definitely do work, it must have been something in your code. (I guess I'm just stubborn and curious. I wouldn't have been able rest until I found the problem in my code ;-) But glad you have something working now.

arrgh 22 Posting Whiz

And what about the rest? The best way to figure out why the query isn't selecting anything is to cfdump the data it's using. It could be you're using a totally wrong value. But you won't know it unless you see the values

<cfdump var="#query1#">
<cfdump var="#query2#">

arrgh 22 Posting Whiz

The most common cause is the value you're trying to select does not exist in the values used to populate your list.

For one thing, QUERY1 appears to be selecting all records from tblMain. So when you use selected="#QUERY1.TrussTypeID#" CF will use the value in the first record of the query only. So perhaps that's your problem.

Also, I'd suggest you cfdump both #QUERY1.TrussTypeID# and #query2#. Does #query2# actually contain the _value_ #QUERY1.TrussTypeID# ?

arrgh 22 Posting Whiz

This same post has appeared in other forums as troll bait. Do not feed the trolls!
http://en.wikipedia.org/wiki/Troll_%28Internet%29

Salem commented: Well said! +20
arrgh 22 Posting Whiz

Does a query have to be set up differently when it is a query of query?

Yes.

You can't use regular CF functions inside a QoQ. It's not a database query, so it's internal syntax is very limited. Only a handful of functions are implemented. None of which will help in your case.

If you need that functionality you'll have to 1) use date functions it in the original database query or 2) loop through the query, record by record, and use CF's date functions on the values (obviously a bad option).

arrgh 22 Posting Whiz

how to encrypt & decrypt an image file
plz rply soon.........

It would be better to start your own question, rather than tacking on a question to a thread written in 2006...

arrgh 22 Posting Whiz

Now i am getting this error.
Element $GLOBALS is undefined in a Java object of type class [Ljava.lang.String;.

APPLICATION.$Globals.IsTestingServer(CGI.SERVER_NAME) or CGI.REMOTE_ADDR EQ APPLICATION.xxxxxxxxxIP>

Sounds like the variable APPLICATION.$Globals was not set for whatever reason. Look in your application.cfc file, where it is being intialized?

arrgh 22 Posting Whiz

This code is a website's source code which is working perfectly from a ftp server. I have not made any changes to the code, but when i try to run the code in my local machine using CFbuilder and CF 9 i am getting this error.

I don't know about CFBuilder, but the error is pretty clear. It can't find that page. So assuming the code is correct, you're either missing a mapping OR that file doesn't exist.

It sounds like you're running against a local copy of the code. If so, 1) which web server are you using and
2) where did you place the files?
3) where is this index.cfm page physically located? ie The absolute path c:\pathto\index.cfm?

By default CF is looking for the _errorMap.cfm file in a folder named "config" beneath the web root. If you set up the developer version, with the built in web server, the default web root is something like:

c:\coldfusion9\wwwrooot

So the full path to the file would be:

c:\coldfusion9\wwwrooot\config\_errorMap.cfm

If that's the configuration you're using, check that location and make sure the file exists. Maybe you copied the files to the wrong location.

arrgh 22 Posting Whiz

Could not find the included template /config/_errorMap.cfm.

The index.cfm page (or a page referenced by it) is trying to include another page called "_errorMap.cfm". The CF server cannot find that page. Either because the file doesn't exist or there's a missing mapping.

arrgh 22 Posting Whiz

I really don't have an answer for you, but the suggestion on the adobe forums seems worth investigating

"...it appears as if you are routing pretty much everything through a /cazare.cfm template. Not just HTML, but images, JS and CSS as well. That is quite likely a big part of what is causing the problem. . If possible, move your static content somewhere where it does not get processed by CF."

Another good resource for serious CF developers is:
http://www.houseoffusion.com/groups/cf-talk/

Good luck!

arrgh 22 Posting Whiz

It is good to show some effort first. Please post what code you've tried so far.

Hint: You'll need MIN(), MAX() and GROUP BY
http://www.w3schools.com/SQl/sql_func_max.asp
http://www.w3schools.com/SQl/sql_func_min.asp
http://www.w3schools.com/SQl/sql_groupby.asp

arrgh 22 Posting Whiz

No offense but that query is terribly inefficient. Yes, you can do this the long way (with CF code). But most db's have far more efficient ways to calculate sums for a set of 7 values.

arrgh 22 Posting Whiz
<cfset total =  val(#Find_Max.MaxID#) + val(#RandRange(1,10)#)>
<cfoutput>val(#RandRange(1,10)#)</cfoutput><br />
<CFOUTPUT>#Find_Max.MaxID# + random number = #total#</CFOUTPUT>

A few tips on more elegant code
1) RandRange _always_ returns a number, so using VAL() is unnecessary.
2) The pound # signs aren't needed except in the CFOUTPUT
3) Rather than using multiple CFOUTPUT tags, just use one set and put all of the output code inside it

<cfset theRandNum = RandRange(1,10)>
<cfset total =  val(Find_Max.MaxID) + theRandNum >
<CFOUTPUT>
  random number = #theRandNum#<br>
  #Find_Max.MaxID# + random number = #total#
</CFOUTPUT>
arrgh 22 Posting Whiz

I am not sure what you're asking here. Are you asking how to perform some validation on the client side (javascript), how to save the information to a database, or something else?

arrgh 22 Posting Whiz

I keep getting redirected to the FailedLogin.cfm script.

<cfif IsDefined(HTMLEditFormat("FORM.j_username"))>

      <cfif MM_rsUser.RecordCount NEQ 0>
           .....
     <cfelse>
         .....
     </cfif>

      [B]<cflocation url="#MM_redirectLoginFailed#" addtoken="no">[/B]

<cfelse>
.... 
</cfif>

Well ...look at your code. That is exactly what you're telling CF to do ... always redirect to login failed.

Did you actually test this code? Because it doesn't look right ...

arrgh 22 Posting Whiz

The text field values need to be stored using #ListGetAt(FORM.txtValue, getIDs.CurrentRow)# instead of just 'FORM.txtValue'

That is not a good idea. If the form field contains comma's the script will error out. Better to keep the fields separate by dynamically naming them txtValue1, txtValue2, etc...

arrgh 22 Posting Whiz

I don't see any file with index, either cfm or html. When I look directly in the adobe/coldfusion8/cfide/administrator I don't see an index file there either.

I'm guessing that is my problem--so what I do now? Reinstall?

The physical path for those files is typically c:\coldfusion8\wwwroot\cfide\administrator. But since I cannot see what files actually are there ... yes, an uninstall followed by a reinstall of CF8 seems the best option.

arrgh 22 Posting Whiz

I found this page:
http://www.talkingtree.com/blog/index.cfm?mode=entry&entry=88BDF4E4-50DA-0559-A023C957D70CD2EC
but I don't quite understand how to do what it is suggesting.

I only glanced at the article, but I think it is talking about something different. But, since you say you get a list of files when you go to:

http://localhost:8500/cfide/administrator

Just look for a file named "index.cfm" or "index.html" and click on it.

arrgh 22 Posting Whiz

That is default location, but make sure they are no typos in your url.
But if you installed the full development version, there should a shortcut added to your program menu. With CF 8:
start -> programs -> Adobe -> ColdFusion8 -> Administrator

arrgh 22 Posting Whiz

I've installed coldfusion and its server. I have two major questions and am completely new to CF.

1. I copied a folder from our website (our hosting company put it together for us) into the wwwroot folder.
I am able to access only one of the pages of that folder--the index page.When I try to follow to any of the linked pages it takes me right to the internet based page rather than the same page stored on the server.

2 When I try to open the admin panel at http://localhost:8500/cfide/administrator I get a list of files rather than an admin panel. (Index of /cfide/administrator/)

What am I doing wrong?

1. Without seeing the code, it suggest the links are using absolute urls, rather than relative urls. The links have to be updated to point to your site, rather than the external one.

Absolute:
<a href="http://someothersite.com/pageA.cfm">Page A</a>

Relative (ie Go to "PageA.cfm" on _this_ server in _this_ folder)
<a href="pageA.cfm">Page A</a>

2. By default it is showing the contents of the folder, rather than index page. Just add "index.cfm" to the url

http://localhost:8500/cfide/administrator/index.cfm

arrgh 22 Posting Whiz

Take a look at the documentation for cfquery and cfoutput. The examples are very easy to understand:
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_m-o_16.html

arrgh 22 Posting Whiz

Care to share? ;-)

arrgh 22 Posting Whiz

Yes, that would be fine for a single file. But probably not an option if they need to work with many/dynamic files.

arrgh 22 Posting Whiz

Well .. jExcel, POI, etc... are the better options (IMO). BUT they are definitely more complicated. Of course if you are not allowed to use createObject, you'll have to forget about those options, and COM as well. All of them require createObject. There is no way around that.

(By the way, COM is an old technology and is really not well suited for server use. But there are some good, albeit old, examples on this site)
http://cfregex.com/cfcomet/Excel/index.cfm?ArticleID=0239B2E5-5FED-11D3-B3E9004033E03EF9

Anyway, that basically leaves you with ODBC. It has been a while since I've used an Excel ODBC datasource. But I _think_ you can use a single datasource to read multiple files. Either with an Excel or Access ODBC Datasource.

IIRC, one or both of those datasource types will accept a file path in the query SQL. So you should be able read any excel file, as long as the CF account has permission to access it.

I can't recall the exact syntax, but something along these lines.

<cfquery ... >
SELECT *
FROM [Sheet1$]
IN 'c:\someFolder\yourFile.xls' 'EXCEL 8.0;'
</cfquery>

arrgh 22 Posting Whiz

so that the request.dsn code will look for jirehadmin_accesscf_jireh instead of access_db/jireh.mdb.

Look at how datasources are created here. That is exactly what your host did to create your datasource.
http://www.garyrgilbert.com/tutorials/coldfusion/beginner/connecttodatabase.cfm

Ask your host where you should store your database file, and what name you should use.

arrgh 22 Posting Whiz
arrgh 22 Posting Whiz

You would have to test it out, but it seems like you need to track 3 things:

1) the number of consecutive bad logins
2) the date and time of the last bad login
3) a boolean flag indicating whether the user is permanently locked out

When a user attempts to log in, you could retrieve those three fields for supplied user name:

1. If the user does not exist, display an error and abort.
2. Next, check if they are permanently logged out. If yes, display an error and abort
3. Check the current time against the date of temporary lockout. If the date is not null and within 20 minutes, display an error and abort.

If they pass those checks, verify their login information:

1. if the passwrd is valid, reset the bad login information
a) reset bad login count = 0
b) reset last bad login date = NULL

2. Otherwise, update the bad login information
a) increment the bad login count
b) if new login count is = 4, display a message that the next attempt will lock them out for for 20 minutes. Suggest they use your application's "Forgot your password" option.
c) if new login count is = 5, update the temporary lockout date and time.
Display a message that they are locked out for 20 minutes.
c) if the login count >= 10, set the permanent lockout flag to true

HTH

arrgh 22 Posting Whiz

Data Source cant be found

It sounds like you are just using the wrong datasource name. Ask your host.
1) Did they create a datasource for you. If not, ask them to create one
2) If they have created one already, what is the name of the datasource? You may be using the wrong one.

arrgh 22 Posting Whiz

Hi arrgh,
I use query of quries to get the desired output, what i am struglling right now is qofq does not support outer joins.

There are hacks, but it is a bit of a pain.
http://instantbadger.blogspot.com/2006/07/faking-left-outer-join-in-query-of.html

I was thinking more along the lines of doing the outer/cross join in your original queries. Then you could still do inner joins in your QoQ. Though you would probably have to join on the new "Value Position" column as well.

arrgh 22 Posting Whiz

So what happened when you tried the suggestions on the other thread?

arrgh 22 Posting Whiz

For anyone else reading this thread, there may some good suggestions in one of the OP's other threads:

http://forums.devshed.com/coldfusion-development-84/cfimage-587863.html?b369ec67f7caf1d3bbf155c73a5c6dce

arrgh 22 Posting Whiz

As mentioned on your other threads, you need to provide more information ;-) Like a code and image sample, an error message, etc..

arrgh 22 Posting Whiz

I have not done it in a while, but the other server has to be accessible to the account CF is running under. For example, if the other server is set up as a mapped drive, the ColdFusion user account must have permission to access that drive. IIRC, the typical user account "System" (on windows), does not.

In other words, cffile only works on your local server (or any drives accessible on your local server).

arrgh 22 Posting Whiz

Hi arrgh,
I am guessing when each result line gets added into the result table it also needs to add a line into the lookup table as well, right?

That depends on whether the number of "values" is fixed or not. Maybe this is too simple, but the way I see it, the "value" position is linked to the group order.

Group1
<set value=100> <!--- value position 1 --->
<set value="">
<set value="">


Group2
<set value="">
<set value="350"> <!--- value position 2 --->
<set value="">


So if you had a look-up table with all of the needed value positions (ie In this case 3), you could do an outer or cross join to it to generate all of the necessary rows. For example, say your group table contained 3 groups:

GroupName, GroupOrder
Group1,1
Group2,2
Group3,3

And you had a "valuePosition" table with all of the positions (ie 3)

ValuePosition
1
2
3

You could do an outer or cross join to produce return all positions for each group.

GroupName, GroupOrder, ValuePosition
Group1, 1, 1
Group1, 1, 2
Group1, 1, 3

Group1, 2, 1
Group1, 2, 2
Group1, 2, 3

Group1, 3, 1
Group1, 3, 2
Group1, 3, 3

....

Then from there use a CASE to return a value of "" or 0 if …

arrgh 22 Posting Whiz

My first thought was to modify the query to return the needed results. Then it would be easy to construct the xml using cfoutput's "group". But I do not know how simple it would be to modify your queries. It looks you are using oracle(?), which I am not as familiar with.

I was thinking about an outer or full outer join with a small lookup table (physical or derived)? The lookup table would contain all of the necessary "value" positions: (ie 1, 2, 3 ) The outer join would then return NULL's for the empty positions.

ie Instead of returning:

Operation1 100 1 1
Operation2 350 2 2
...

The query would return something like
--------------------------------------
Operation1, 100, 1, 1, 1 (value position 1)
Operation1, NULL, 1, 1, 2 (value position 2)
Operation1, NULL, 1, 1, 3 (value position 2)

Operation2, NULL, 2, 2, 1 (value position 1)
Operation2, 350, 2, 2, 2 (value position 2)
Operation2, NULL, 2, 2, 3 (value position 2)

That may or may not work here. But just a thought....

arrgh 22 Posting Whiz

<group1>
<value="100"> <-- This value is in a table
<value=""> <--The null ones are not in a table
<value="">
<value="">

We always no how many rows to return in each group
This formatted data is used for xml graphing output.

What do you mean not in the table? In other words, if they are not in your table what determines that one value should be in first "value" position, versus the second, third or fourth?

arrgh 22 Posting Whiz

So did you figure it out?

arrgh 22 Posting Whiz

The basics of what you need to do are not difficult The only tricky part is extracting the data from excel. But let's take a single file as an example. (I will assume you are using at least MX7)

In general terms there would be a few pieces:

1) Obviously the excel files would need to be copied to your server. Either manually or you could provide an "upload" form to let users upload excel files through a web page. But that all depends on your needs...

2) You would need to create two simple files for your header and footer. Say:

- companyHeader.cfm
- companyFooter.cfm

You could then include (ie display) those files on every page by using an Application.cfc file. It is a special file that runs every time a .cfm page is requested. It contains functions you can use for exactly this purpose.

3) You would need to create a page that would read in the excel file data and store the information in a "query" object. Then you could display it quite simply by using cfoutput.

<cfoutput query="yourQuery">
<!--- columns in the excel file --->
#product# #category#, ... etc...
</cfoutput>

There are a few options for reading information from excel files. From best to worst:

1) You can use a java tool like jExcel or POI to read the excel file
PROS: It is less buggy than other methods.
CONS: It …

arrgh 22 Posting Whiz

I am interested in finding out how I can build a website using Coldfusion and an excel spreadsheet.

I used to work for a company that did this and i am now looking to see how to do it.

No geekspeak here:
I know that the Coldfusion would take the header and footer and combine it with the information from the spreadsheet. I was also told that each page was "made on the fly". The site this was done on is no longer around.

Please forgive my ignorance when it comes to this, but any help is greatly appreciated.

There are some variables here like do you mean an real .xls file or something compatible like a .csv (comma separated) or .txt (tab delimited) file?

But generally speaking:
Within ColdFusion you can read information from an Excel spreadsheet (or delimited file). Then use that use (or display) that information in a ColdFusion page. Can you give a concrete example of what you need to do. It does not need to be technical, just an example like:

I have a .xls spreadsheet containing two columns. I would like to display that information on a ColdFusion page, along with a company header and footer:

Example of the Excel file contents:
===================
Customer Name, Address
B. Smith, 84 Sycamore Street
....

That said, using Excel as a "data source" is not always the best option. It is not a real database .. so there are quirks. Usually is usually …

arrgh 22 Posting Whiz

right nothing seems to be working I keep getting the same error message

Unfortunately, I am out of ideas because I am not using Access 2007. Just a thought, but does Access have an option to convert a database to an earlier version? If so, you might try that. Otherwise, you could always try using another supported database like MySQL, It is pretty stable and I know for certain it works with CF8, because I am using it.

arrgh 22 Posting Whiz

Well, like I said at am not familiar with storing CC's. So I am really not the one to be giving you advice on how to properly secure them. What I will say is that assumedly, Adobe engineers are familiar with encryption, and if they say it is the least secure of the methods, I personally believe them.

Plus, credit card companies can have their own restrictions about merchants storing credit card information. As I understand it, it is not like you can just decide to store information and it is okay with them. You have to be certified and meet certain requirements - of which encryption is probably only one. Only they can say whether or not your setup meets their requirements.

While I may not be able to answer your questions, I think hhamdan is giving you bad advice. He seems more interested in providing "an answer" than trying to provide the correct answer. My advice would be to seek an another area or another forum with more focus and experience with security. But that is just me, and I am not the one who may be held liable. So the choice is yours.

arrgh 22 Posting Whiz

All the others you need to use generate secret key. How would that work how do I decrypt the credit card if I don't know what the key is?

It is not just encryption. Some credit card companies require merchants to meet certain requirements and also pass a certification process if they intend to store credit card info.

http://extranet.mivamerchant.com/forums/showthread.php?t=19217

arrgh 22 Posting Whiz

Try this encryption method
http://tutorial113.easycfm.com/

Now I know you are joking around .. because that still uses Encrypt - with the default CFMX_COMPAT. Hardly good enough security for credit card information.

arrgh 22 Posting Whiz

How reversable are they if you don't have the key?

Adobe's own documentation states that Encrypt uses the CFMX_COMPAT method by default and "This algorithm is the least secure option (default). " Not very secure in comparison to other, better, encryption algorithms. Would you use it if you thought you might be held liable for the consequences?

arrgh 22 Posting Whiz

You need to use the correct syntax. "cfsqltype="(Varchar)"> is not a valid cfsqltype. If you use an invalid type ColdFusion defaults to the type for "char" which may cause unexpected results. All cfsqltypes start with "cf_" like: cf_sql_varchar, cf_sql_integer, etc... You can look up the types in the online documentation.

http://www.google.com/url?sa=U&start=1&q=http://livedocs.adobe.com/coldfusion/8/Tags_p-q_18.html&ei=-PdKSYTXOYnYsAPK45imDQ&usg=AFQjCNHJC-VdBegBKH1uclqArulJB8sCkw

I tried it with MySQL and cfqueryparam and it worked perfectly. That also assumes the column is long enough to hold the inserted value.

arrgh 22 Posting Whiz

I'm Sorry, I should have mentioned that, however that site links you out to a site to download a fix to this problem, which I did, I'm still getting that error

So you tried both:
1. downloading the fix and creating an ODBC datasource AND
2. Using an "Other" datasource with the jdbcURL in the link

... and neither one works?

arrgh 22 Posting Whiz
arrgh 22 Posting Whiz

look my friend i had the same problem and i solved using this kind of encryption

Encryption was not the problem. It was the lack of cfqueryparam, as I already mentioned.

Though, I agree with Salem about security. If you are storing credit card information security and encryption should be very tight. If you are not well versed in it or don't have the experience and resources, there are reputable companies that do. Consider the liability if security is poor ..

arrgh 22 Posting Whiz

Try using cfqueryparam on all of the insert values. It works for me with MySQL.

arrgh 22 Posting Whiz

Here is the syntex

<cfset string = FORM.numCredit>
                    <cfset key = ToBase64(BinaryDecode(#application.key#, "HEX"))>
                    <cfset encrypted = encrypt(string, key)>

Are you using cfqueryparam when you insert the value into the database table?

INSERT INTO YourTable ( EncryptedValue )
VALUES 
(
<cfqueryparam value="#encrypted#" cfsqltype="( sql type for the column )">
)