tonitp Posted January 27, 2005 Report Share Posted January 27, 2005 Hello, Can anyone help me? I have LabVIEW 7 with DataBase connectivity toolset and I want to know how many records there are in the recordset but it always returns -1. I use MySQL. I attach the vi. Thanks, Download File:post-1399-1106861932.vi Quote Link to comment
maximus Posted January 28, 2005 Report Share Posted January 28, 2005 Hello,Can anyone help me? I have LabVIEW 7 with DataBase connectivity toolset and I want to know how many records there are in the recordset but it always returns -1. I use MySQL. I attach the vi. Thanks, 3691[/snapback] From MSDN: Use the RecordCount property to find out how many records are in a Recordset object. The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount. Reading the RecordCount property on a closed Recordset causes an error. There are four different cursor types defined in ADO: Dynamic cursor: allows you to view additions, changes, and deletions by other users; allows all types of movement through the Recordset that doesn't rely on bookmarks; and allows bookmarks if the provider supports them. Keyset cursor: behaves like a dynamic cursor, except that it prevents you from seeing records that other users add, and prevents access to records that other users delete. Data changes by other users will still be visible. It always supports bookmarks and therefore allows all types of movement through the Recordset. Static cursor: provides a static copy of a set of records for you to use to find data or generate reports; always allows bookmarks and therefore allows all types of movement through the Recordset. Additions, changes, or deletions by other users will not be visible. This is the only type of cursor allowed when you open a client-side Recordset object. Forward-only cursor: allows you to only scroll forward through the Recordset. Additions, changes, or deletions by other users will not be visible. This improves performance in situations where you need to make only a single pass through a Recordset. Set the CursorType property prior to opening the Recordset to choose the cursor type, or pass a CursorType argument with the Open method. see also MSDN - Recordset Object Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.