Home > comp > gb.db > connection > quote 
  [3.0]
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
Connection.Quote (gb.db)
Syntax
FUNCTION Quote ( Name AS String ) AS String
Returns a quoted identifier so that you can freely insert it into a query.

This identifier can be a table or a field name.

The quoting mechanism depends on the database server driver, so this method is needed if you need to write database-independant code.

Examples

' Returns the number of records in a query
' sTable is the name of the table. It can include reserved characters, so we need
' to quote it!

rResult = Handle.Exec("SELECT COUNT(*) AS nRecord FROM " & DB.Quote(sTable))
PRINT rResult!nRecord