ISDBDatabase::OpenSQL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(note about locking errors, style) |
||
Line 1: | Line 1: | ||
{{MethodDeclaration|SDBDatabase|ISDBDatabase|Function OpenSQL(SQL As String) As | {{MethodDeclaration|SDBDatabase|ISDBDatabase|Function OpenSQL(SQL As String) As [[SDBDBIterator]]}} | ||
===Parameters=== | ===Parameters=== | ||
Line 12: | Line 12: | ||
===Example code=== | ===Example code=== | ||
<source lang="vb"> | <source lang="vb"> | ||
Set | Set Iterator = SDB.Database.OpenSQL("SELECT DISTINCT TextData FROM AddSongInfo WHERE DataType=200 Order BY TextData") | ||
While Not | While Not Iterator.EOF | ||
' | ' Do something here ... | ||
Iterator.Next | |||
WEnd | WEnd | ||
Set Iterator = Nothing ' Avoid locking errors | |||
</source> | </source> | ||
Latest revision as of 22:51, 20 April 2013
CoClass SDBDatabase, Interface ISDBDatabase
Function OpenSQL(SQL As String) As SDBDBIterator
Parameters
Name | Type | Description |
---|---|---|
SQL | String | SQL string specifying the query. |
Method description
Returns SDBDBIterator object with records specified by SQL parameter.
Example code
Set Iterator = SDB.Database.OpenSQL("SELECT DISTINCT TextData FROM AddSongInfo WHERE DataType=200 Order BY TextData")
While Not Iterator.EOF
' Do something here ...
Iterator.Next
WEnd
Set Iterator = Nothing ' Avoid locking errors