Command: SQL_FetchNext
- Updated2024-09-12
- 3 minute(s) read
Commands > Command: SQL_FetchNext
Command: SQL_FetchNext
Transfers the next SQL result block.
Call SQL_FetchNext()
Input Parameters
| None |
Return Parameters
| Specifies whether the Select result includes other data blocks. | |
| Receives the status of an SQL command. |
DIAdem transfers the first SQL result block after a SELECT command.
| Note Refer to the page on The ODBC/SQL Interface for general information about the ODBC/SQL commands. The SQL Script Command Examples show how to use the ODBC/SQL commands. |
| Note Use the ADO interface to access databases in VBS. |
Example
The following example opens the Example.mdb data store and transfers the data from the Speed column to the new MySpeed data channel in the Data Portal. The example then disconnects the Example.mdb data store.
| VBScript | Python |
Call Data.Root.Clear() Call SQL_Connect("Example", "","","") If (SQL_ConnectStat = true) Then Call SQL_ExecDirect("Select * From Example") If (SQL_Stat > 0) Then Call SQL_BindChannel("MySpeed","Speed","n") Do While SQL_Next Call SQL_FetchNext() Loop End If Call SQL_DisConnect End If
Related Topics
Command: SQL_AutoCommit | Command: SQL_Delete | Command: SQL_ExecDirect | Command: SQL_Insert | Command: SQL_Select | Command: SQL_Transact | Command: SQL_Update | Examples | ODBC/SQL

