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

Retrieving data using ADBC

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have been using adbc to populate a form with information in a database. It all works except when I use the SQL COUNT statement, I cannot retrieve the column data which should hold the number of rows in the table in one column named "COUNT". When using row.COUNT.value I get an error saying that row.COUNT has no properties. Please respond ASAP, Im on a deadline for the form.
 
It's hard to make out what it is that you are doing, but it sounds like you are retrieving an array of data from a database of some sort, and then having a problem getting the information back out, or a recordcount. If that's it, then make sure you have it move to the last record first, you need to "reset" the recordset. (ex. Database.Recordset.MoveLast) I don't know why it works, but it does.

Hope that helped.
 
The cursor type that you are choosing to pull the data is of the incorrect type. Some cursor types will create recordsets that do not support the count property.
 
Hi

Sigmaman is correct, you need to set the cursortype to 3 to allow the count property to work. One point of warning, don't use "count" as the name of your field, as this can sometimes freak out ADO. In fact steer well clear of anything which is a reserved keyword such as "index", "count", "group", "where"...

In order for us to finish off this problem, post the SQL code that you are using for your recordset (hopefully using ASP). We can then get the full picture. Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top