Ask a Question related to Coldfusion Database Access, Design and Development.
-
supportcenter #1
RecordCount Issues
Hi folks!
Long story short: Within the application, which I'm developing ATM, I have to
do some update- and delete-queries, but it seems that they do not return
anything. I can't even cfdump the queries because they are undefined. All I
want is the number of deleted or updated rows. Does cfquery not support this or
what?
Some examples:
<cfquery name="deltest" datasource="#dsn#">
select * from testtab
</cfquery>
<cfdump var="#deltest.RecordCount#">
<cfquery name="deltest2" datasource="#dsn#">
INSERT INTO testtab( iddi )
VALUES ('asdasd')
</cfquery>
<cfdump var="#deltest2#">
<cfquery name="deltest3" datasource="#dsn#">
delete from testtab where iddi='asdasd'
</cfquery>
<cfdump var="#deltest3#">
supportcenter Guest
-
Indirect recordcount
I have a variable that contains the name of a query. How can I get the RecordCount for that query? I've tried using Evaluate() in several... -
Getting a recordcount
Hi I have opened a database in PHP and would like to know whether a particular record exists. i.e. $ThisUsername = $_REQUEST;... -
recordcount -1
I'm simply trying to get a number of records returned in a recordset, and just get a -1. I have looke din a few books and other references, can't... -
RecordCount Property and SQL
When using an access database, I could retrieve the recordcount with code below For r = 1 to RS.RecordCount When I try the same syntax on a... -
Why does the RecordCount property always = -1
I have a working set of data coming back from my database without any problems. I am trying to add a textbox to each row of repeated data and... -
SQLMenace #2
Re: RecordCount Issues
If you are using SQL server you can use the @@Rowcount to get the number of
records inserted or updated
you can try this
INSERT INTO testtab( iddi )
VALUES ('asdasd')
select @@rowcount as Rowcount
but I don't know if it will work like that, if not convert your code to stored
procedures
SQLMenace Guest
-
Dan Bracuk #3
Re: RecordCount Issues
run a select count(fieldname) right before you update or delete the records.
As long as the where clauses are the same, it should work.
Originally posted by: supportcenter
Hi folks!
Long story short: Within the application, which I'm developing ATM, I have to
do some update- and delete-queries, but it seems that they do not return
anything. I can't even cfdump the queries because they are undefined. All I
want is the number of deleted or updated rows. Does cfquery not support this or
what?
Some examples:
Dan Bracuk Guest
-
supportcenter #4
Re: RecordCount Issues
Thx. I think that I've already made enough slow database queries so that I do
not really want to verify those querys by "select count..."
Would have been nice if there was a RecordCount to get the number of affected
rows. Luckily I do not really need it, but it would have been nice to have a
_simple_ method of verification. But thanks anyway.
supportcenter Guest
-
mxstu #5
Re: RecordCount Issues
supportcenter,
For future reference, it's always helpful to indicate the type of database
you're using. It's possible that your database type does have this capability,
but without knowing which type, it is difficult to definitively answer your
question.
mxstu Guest
-
supportcenter #6
Re: RecordCount Issues
I'm sorry...normally I do mention all the required information.
It's MySQL 4.something together with CFMX 6.x
Btw: isn't it possible to use some other username than the first part of my
mail-address?!
supportcenter Guest
-
mxstu #7
Re: RecordCount Issues
supportcenter,
You might have a look at this thread which suggests a few possibilities:
[url]http://forums.mysql.com/read.php?60,45239,45239#msg-45239[/url]
[url]http://dev.mysql.com/doc/refman/5.0/en/information-functions.html[/url]
mail-address?!>Btw: isn't it possible to use some other username than the first part of my
I don't know that it is possible to change your screen name after you sign up.
Weren't you given the option to select your username? IF it were possible, it
might be under membership details:
[url]http://www.macromedia.com/cfusion/membership/index.cfm[/url]
mxstu Guest



Reply With Quote

