I have a database with one record (named Site_Structure). Refer to the CFQUERY below:
<CFQUERY NAME="Assign_ID" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT * FROM Site_Structure</CFQUERY>
Here is how I implement RecordCount:
<CFOUTPUT><input type="text" name="ID" size="5" value="#Val(Assign_ID.RecordCount + 1)#"></CFOUTPUT>
In the input box, I use RecordCount to get how many records are in the database and then add one (so the next record's primary key ID follows the previous record's).
However, when I run the template, it returns a value of 6, when I am positive that there is only one record in the database, and thus the value should read 2! I checked the database to make sure that there is only one record--so how do I reset the DSN to reflect the changes in the database? [sig]<p>Ryan ;-]<br>[/sig]
<CFQUERY NAME="Assign_ID" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT * FROM Site_Structure</CFQUERY>
Here is how I implement RecordCount:
<CFOUTPUT><input type="text" name="ID" size="5" value="#Val(Assign_ID.RecordCount + 1)#"></CFOUTPUT>
In the input box, I use RecordCount to get how many records are in the database and then add one (so the next record's primary key ID follows the previous record's).
However, when I run the template, it returns a value of 6, when I am positive that there is only one record in the database, and thus the value should read 2! I checked the database to make sure that there is only one record--so how do I reset the DSN to reflect the changes in the database? [sig]<p>Ryan ;-]<br>[/sig]