|
-
Feb 11th, 2001, 06:46 PM
#1
Hi, I am in the process of buildig an interface for MySql. I have no problems returning a list of databases, the tables in each, and the description of each table. However, I am forced to use the Command object in doing this. I need to return the number of records that is populating a table explanation. I am unable to use the .RecordCount property due to the type of recordset that the command object returns. Perhaps a nested SQL statement? e.g. : select count(*) from 'explain table_whatever' haven't tried this... thanks for your help!! Any ideas of other ways to get the record count? Note that this is NOT a normal recordset, this recordset is a description of a table (fields, data types, keys, etc) so select count(*) by itself will not work. Thanks for your help!
-
Feb 11th, 2001, 07:13 PM
#2
Fanatic Member
Try this:
Code:
lngCount = 0
Do While Not rs.EOF
lngCount = lngCount + 1
rs.MoveNext
Loop
Regards,
TheBao
-
Feb 11th, 2001, 07:19 PM
#3
thanks for your suggestion! at this point, that's exactly what i'm using. however, i'm trying to keep this app as efficient as possible, so this is only a temporary solution... thanks again!
-
Feb 11th, 2001, 09:11 PM
#4
Member
What are you using for your frontend? If you have the ability to use a standard Data Control (DAO), then you are in luck. Use the datacontrolname.recordset.recordcount property after selecting just one field in its entirety. I hope that makes sense.
-
Feb 11th, 2001, 11:08 PM
#5
unfortunately, i'm not using any controls directly per se... i'm forced to use the command object to retrieve information from the server, and place it in a flex grid... at this point i have been forced to use the old loop method to retrieve the record count... since the information is only information concerning each table, it's not much of a hinderance... but i've learned a few tricks from this...
anyone that would like to see the app in it's early pre alpha stages, let me know... it's strictly for MySQL users and only on the Win32 platform... and i could use the debugging help... thanks!
-
Feb 11th, 2001, 11:28 PM
#6
Guru
set your recordset object to use a client side cursor:
example
dim objRS as Recordset
objrs.cursorlocation = adUseClient
objrs.open CommandObject
with a client side cursor you will then be able to use the .Recordcount property of the recordset
-
Feb 12th, 2001, 05:53 PM
#7
Lively Member
Small world, idover - I'm in Atlanta too! I've thought about building a front end admin app for mySQL but I guess I'm too lazy. I wish there was an admin app for mySQL that is as user friendly as SQL Server's Enterprise Manager. I would like to get a look at your app though and offer any assistance that I could.
Thanks.
Um americano que fala portugues.
-
Feb 12th, 2001, 09:14 PM
#8
great ttingen! you can send an email to me after checking profile... btw... i work for a company that caters to spanish and portuguese speakers worldwide... the world gets smaller yet...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|