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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help please, I'm running a

Status
Not open for further replies.

brianjay

Programmer
Sep 14, 2000
42
US
Need help please,
I'm running a 3 page process where on the 1st page I gather info for a DB file. One of the things I do is add a #1 to a field as a pointer. The 2nd page, I "INSERT" the info to the DB. On the 3rd page I do a query to print certain info from the DB. The query is:

<cfquery DATASOURCE=&quot;MNET&quot; NAME=&quot;nds&quot;>
SELECT * FROM NDS WHERE MNETDone = '1'
</cfquery>

My problem is that the database prints out the info that was previously entered, and not the current info, so I'm alway going to be short by 1 report. The last step in the printing process takes the pointer and changes it from a 1 to a 2. Am I missing a step to print the current info or is it that the process can't keep up with the writting to the DB?

Brian
 
OK, you say that the last step of the printing process, which is on page 3, is to change the pointer from a 1 to a 2. If that is true, then the database should not have ANY records with a value of 1, if the problem is speed in updating the database, if I understand you correctly.

Have you confirmed that after your entire three page process is done that there are no records with a 1 in the pointer field? Kathryn


 
maybe I wasn't too clear. here's the steps as they occur:

1) User enters info on add.cfm, also a pointer ( a &quot;1&quot;) is
added to a field named &quot;APIdone&quot; in the DB.

2) Upon hitting the submit button, add2.cfm activates,
inserting all info to the DB. The <cflocation> sends the
user to submitlist.cfm

3) SubmitList.cfm checks
<cfquery DATASOURCE=&quot;MNET&quot; NAME=&quot;nds&quot;>
SELECT * FROM NDS WHERE MNETDone = '1'
</cfquery>

If a &quot;1&quot; appears, which it should because it was placed in step 1, certain info from the DB will be sent to a <CFFILE> process.

All I get is a blank file and I'm not sure why.

- Brian
 
In your step 1, you say the pointer is added to a field &quot;APIdone&quot;, but then in step 3, you query by testing a field called MNETDone = 1. Is this correct?

What do you mean by &quot;a pointer is added to a field&quot;? Do you mean that a value is inserted into a field?


My first suggestion is to use <cfabort> to stop processing at various points. Check the db at each point to make sure what you think is happening is happening.



Kathryn


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top