sql Open
sql open {file|:memory:}Also searchable as: sql Open
sql open opens the database file for this script tab, creating it if it does not exist. An already open
database is closed first.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
file |
Path of the database file. A relative path starts from #CurPath (the folder of EasyUOReforged.exe), the same rule as call. |
:memory: |
A throw-away database that lives only until it is closed. |
Example
Section titled “Example”sql open C:\EasyUO\mychar.dbif #SqlRes <> OK display ok Could not open the database: #SqlReshaltTo use several files at once, attach them: sql exec ATTACH 'C:\data\other.db' AS other, then write
other.table. ATTACH paths are relative to the working directory of EasyUO Reforged, not to #CurPath,
so give a full path.
See Using SQL for how statements are written and how variables go in and out.