DBStatement.BindString Method

Binds a parameter in a prepared statement to a given string value.

void BindString(int param, const char[] value, bool copy)

Parameters

int param

The parameter index (starting from 0).

const char[] value

The string to bind.

bool copy

Whether or not SourceMod should copy the value locally if necessary. If the string contents won't change before calling SQL_Execute(), this can be set to false for optimization.

Errors

Invalid parameter index, or SQL error.