Xbasic
SQL::ConnectionDropIndex Method
Syntax
Result_Flag as L = DropIndex(TableName as C, IndexName as C, [TableOwner as C])
Arguments
- TableNameCharacter
The name of the table containing the index.
- IndexNameCharacter
The name of the index to delete.
- TableOwnerCharacter
Default = "". The owner of the table.
Returns
- Result_FlagLogical
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
Description
Drop the index named from table specified in the currently connected database.
Discussion
The DropIndex() method drops the named index from the table specified in the currently connected database.
Example
dim conn as SQL::Connection dim sql_statement as C sql_statement = "drop database northwinds" if .not. conn.open("{A5API=Access, FileName='C:\Databases\Northwind\northwind.mdb', UserName='Admin'}") then ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.DropIndex("Customers", "ContactName") then ui_msg_box("Error", conn.CallResult.text) end if conn.close()
See Also