943,697 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Marked Solved
  • Views: 1433
  • ColdFusion RSS
Jul 16th, 2008
0

Confusion on CF form finding CSV database

Expand Post »
Greetings,

I have a problem with CF code, and I assume it is because I am new to ColdFusion. I've searched the Web, the Adobe pages, the Forums here, tutorials, etc... I just can't find the answer to what I imagine to be a fundamental of CF.

I just inherited CF code that queries a CSV "database", searches for any fields in the database that match user-inputted text, and returns any records containing matched text. This code was on another server and it worked fine, but on its new server (which does have full CF support) I cannot get records returned. I am assuming that I simply do not know either what to name the CSV or where to store it, or both.

Code details:

The initial CF form, "search.cfm", takes user-inputted text and calls "searchaction2.cfm", as referenced by
ColdFusion Syntax (Toggle Plain Text)
  1. <cfform name="form" method="post" action="searchaction2.cfm" onsubmit="return ValidateForm();">

However, when I submit this form, I only get an error message that points to these lines in "searchaction2.cfm":
ColdFusion Syntax (Toggle Plain Text)
  1. <cfquery name="first" datasource="cmp_pama">
  2. SELECT * FROM Bib_New WHERE id=id
  3. <cfif #form.searchText1# is not "">

So, what do I name the CSV or where do I store it? In the properly-organized site files I was given, the name/location isn't working. Moving it into the same directory as these search files didn't work. Renaming it to "cmp_pama", "cmp_pama.csv", "Bib_New", and "Bib_New.csv" all didn't work (though honestly I may have missed one of those in my trials). I'm sure I'm missing something that would be obvious with experience....

Thank you very much for your help, even for only reading my plea. It is greatly appreciated!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pamarchy is offline Offline
3 posts
since Jul 2008
Jul 16th, 2008
0

Re: Confusion on CF form finding CSV database

You need to create the datasource in the ColdFusion administrator if you have access to it.
Reputation Points: 23
Solved Threads: 10
Junior Poster in Training
cmhampton is offline Offline
79 posts
since Feb 2008
Jul 16th, 2008
0

Re: Confusion on CF form finding CSV database

Thank you greatly for writing! Am looking into that now... from "if you have access to it" that means a call in to the site's hosting company to find out.
Will follow-up either way. Thank you!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pamarchy is offline Offline
3 posts
since Jul 2008
Jul 16th, 2008
0

Re: Confusion on CF form finding CSV database

For finality:
Seems "administrator if you have access to it" was the tip I needed... Called hosting company's tech support, they walked me through with what I needed. Wasn't just a datasource issue, was uploading the database to the server, etc etc.... Thanks for the help!! :-)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pamarchy is offline Offline
3 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Looking for CF_Magick custom tag
Next Thread in ColdFusion Forum Timeline: Connecting Coldfusion to SQL Server





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC