Response #3 to "Database driver not reading Blob objects"
View issue in fullCode sample;
' Gambas module file
PUBLIC SUB Main()
DIM db AS Connection
DIM resultSet AS Result
db = NEW Connection
WITH db
.Host = "scalix"
.user = "root"
.Password = "*******"
.type = "mysql"
.name = "axis"
.Open
END WITH
resultSet = db.Exec("SELECT id,stamp,image FROM camera_1")
PRINT resultSet!id
PRINT resultSet!stamp
PRINT resultSet!image
PRINT Len(resultSet!image)
PRINT Len(resultSet["image"])
db.Close
END
Sample Output;
----
1
19/07/2007 21:30:47
0
0
----
MySQL Output;
mysql> select id,stamp,length(image) from camera_1 limit 1;
+----+---------------------+---------------+
| id | stamp | length(image) |
+----+---------------------+---------------+
| 1 | 2007-07-19 21:30:47 | 5199 |
+----+---------------------+---------------+
1 row in set (0.00 sec)
Database attached.
' Gambas module file
PUBLIC SUB Main()
DIM db AS Connection
DIM resultSet AS Result
db = NEW Connection
WITH db
.Host = "scalix"
.user = "root"
.Password = "*******"
.type = "mysql"
.name = "axis"
.Open
END WITH
resultSet = db.Exec("SELECT id,stamp,image FROM camera_1")
PRINT resultSet!id
PRINT resultSet!stamp
PRINT resultSet!image
PRINT Len(resultSet!image)
PRINT Len(resultSet["image"])
db.Close
END
Sample Output;
----
1
19/07/2007 21:30:47
0
0
----
MySQL Output;
mysql> select id,stamp,length(image) from camera_1 limit 1;
+----+---------------------+---------------+
| id | stamp | length(image) |
+----+---------------------+---------------+
| 1 | 2007-07-19 21:30:47 | 5199 |
+----+---------------------+---------------+
1 row in set (0.00 sec)
Database attached.
