SQLlite big string column question
Posted: Wed Aug 11, 2010 9:21 pm
Lets say I had a string of about 3000 characters and I wanted to save it to a column of a table in a SQLlite DB... Does anyone know what COLUMN type that should be?


http://www.purebasic.com
https://www.purebasic.fr/english/
one of the great benefit of SQLite is creating typeless columns.Rook Zimbabwe wrote:Lets say I had a string of about 3000 characters and I wanted to save it to a column of a table in a SQLlite DB... Does anyone know what COLUMN type that should be?
Code: Select all
Create myTable (myColumn)
If I only had known about all those benefits three years agoKiffi wrote:one of the great benefit of SQLite
this is your opinion, not mine.Edwin Knoppert wrote:Programmers need restrictions to fix their code and prevent/reduce bugs.
no truncation here:Rook Zimbabwe wrote:It looks like SQLLite automatically truncates the line...
Code: Select all
UseSQLiteDatabase()
DB = OpenDatabase(#PB_Any, ":memory:", "", "", #PB_Database_SQLite)
DatabaseUpdate(DB, "Create Table myTable (myColumn)")
DatabaseUpdate(DB, "Insert Into myTable (myColumn) Values ('" + Space( 1000) + "')")
DatabaseUpdate(DB, "Insert Into myTable (myColumn) Values ('" + Space( 5000) + "')")
DatabaseUpdate(DB, "Insert Into myTable (myColumn) Values ('" + Space( 10000) + "')")
DatabaseUpdate(DB, "Insert Into myTable (myColumn) Values ('" + Space(100000) + "')")
DatabaseQuery(DB, "Select * From myTable")
While NextDatabaseRow(DB)
Debug Len(GetDatabaseString(DB, 0))
Wend