Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query works on one side of my page but not on the other!

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
US
I have a cf page that separates arrival and departure information using frames. The same query should work for both sides, but, it does not. The only difference between the arrival and departure information is the value of one variable - "type" (i.e. type 1 = arrival information and type 2 = departure information).

Does the frame have something to do with my query working for the arrival information but not for the departure information? If so, what is the remedy??? The error message I get is:


ODBC Error Code = 07001 (Wrong number of parameters)


[MERANT][ODBC SQL Server Driver]COUNT field incorrect

Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly.


Can anyone shed ANY light?!?!?
 
Nah, frames can't be the problem, unless you are passing variables to a frameset and you want to use those variables inside the pages that the frameset contains. Please show me some more code so I can try to help.


<webguru>iqof188</webguru>
 
Webguru,

That IS my code! And, I AM passing variables from my first page (whether I want to view arrival or departure information) from my first page to the second page. I've never used frames before and didn't realize this would be a problem. Is the work-around simple?
 
My friend :), I am not particulary interested in the error code, but more in your CF code. Maybe this will help in the meantime??

<!--- Link to a frames page --->
<a href=&quot;frames.cfm?MyVar=#MyVar#&quot;>Link</a>

<!--- The page with the frames (i.e. frames.cfm) --->
<frameset rows=&quot;50%,*&quot;>

<frame name=&quot;top&quot; src=&quot;Page1.cfm?MyVar=<cfoutput>#URL.MyVar#</cfoutput>&quot;>
<frame name=&quot;bottom&quot; src=&quot;Page2.cfm&quot;>
</frameset>

<!--- ...and Page1.cfm --->
<cfoutput>#URL.MyVar#</cfoutput>

In case this don't help you, send your CF code, I am sure we will sort it out. Good luck!

<webguru>iqof188</webguru>
 
Ew! Many apologies!!! Ye olde grey matter just 'ain't what it used to be!

My frame code(created by another developer)via JS is below:

function openFrameless(){
if (beIE){
NFW = window.open(&quot;&quot;,&quot;popFrameless&quot;,&quot;fullscreen,&quot;+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
var frameString=&quot;&quot;+
&quot;<html>&quot;+
&quot;<head>&quot;+
&quot;<title>&quot;+title+&quot;</title>&quot;+
&quot;</head>&quot;+
&quot;<frameset rows='*,0' framespacing=0 border=0 frameborder=0>&quot;+
&quot;<frame name='top' src='&quot;+urlPop+&quot;' scrolling=auto>&quot;+
&quot;<frame name='bottom' src='about:blank' scrolling='no'>&quot;+
&quot;</frameset>&quot;+
&quot;</html>&quot;
NFW.document.open();
NFW.document.write(frameString)
NFW.document.close()
} else {
NFW=window.open(urlPop,&quot;popFrameless&quot;,&quot;scrollbars,&quot;+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
}
NFW.focus()
if (autoclose){
window.onunload = function(){NFW.close()}
}
}

</SCRIPT>

Below is my code that sends the user from one page to the other:


<a href=&quot;Location.cfm?location_key=#location_key# target=&quot;_blank&quot;>Edit</a&quot;>

The location key determine if it is an arrival or a departure.
 
Why are you using a Javascript here? I seem to be missing the point of what you are trying to do here (no offense :) ). I'll give it a try anyways ;-) :

<a href=&quot;Location.cfm?location_key=#location_key# target=&quot;_blank&quot;>Edit</a&quot;>

<!--- The location.cfm page: --->

<frameset rows=&quot;*,0&quot;>
<frame name=&quot;top&quot; src=&quot;Page1.cfm?location_key=<cfoutput>#URL.location_key#</cfoutput>&quot;>
<frame name=&quot;bottom&quot; src=&quot;about:blank&quot;>
</frameset>

Is this what you mean? If not, please try to tell me what you want to do...








<webguru>iqof188</webguru>
 
WebG-

This page was written by another developer. This is one of those projects where we've divided the functionalities. Believe me - that was NOT my doing. Thus, my confusion.

I will try your suggestion. Many, Many, MANY THANKS!!!!!

P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top