data.runSelectQuery
Description
Load data from a CSV file to a Lua 2D array

Parameters
filename string
includeFieldNames boolean

Return value
cells 2D array (in format cells[yRow][xCol])

Example
-- example 1: Pure SQL select query
local grid = data.runSelectQuery("SELECT * FROM [ItemLocations]", true)
data.printGrid(grid)

-- example 2: Exec SQL Server stored procedure from database
local grid = data.runSelectQuery("EXEC sp_drops_selectDropRecord @dropId=1", true)
data.printGrid(grid)

Comments

See also
data.printGrid

Back
Generated on the 26 June 2024 at 22:01:27 (UK Time)