ISDBDatabase::OpenSQL

From MediaMonkey Wiki
Jump to: navigation, search

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