Confusion on CF form finding CSV database

Thread Solved

Join Date: Jul 2008
Posts: 3
Reputation: pamarchy is an unknown quantity at this point 
Solved Threads: 0
pamarchy pamarchy is offline Offline
Newbie Poster

Confusion on CF form finding CSV database

 
0
  #1
Jul 16th, 2008
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
  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":
  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!
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 72
Reputation: cmhampton is an unknown quantity at this point 
Solved Threads: 10
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: Confusion on CF form finding CSV database

 
0
  #2
Jul 16th, 2008
You need to create the datasource in the ColdFusion administrator if you have access to it.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 3
Reputation: pamarchy is an unknown quantity at this point 
Solved Threads: 0
pamarchy pamarchy is offline Offline
Newbie Poster

Re: Confusion on CF form finding CSV database

 
0
  #3
Jul 16th, 2008
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!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 3
Reputation: pamarchy is an unknown quantity at this point 
Solved Threads: 0
pamarchy pamarchy is offline Offline
Newbie Poster

Re: Confusion on CF form finding CSV database

 
0
  #4
Jul 16th, 2008
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!! :-)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the ColdFusion Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC