Bonjour,
Windows 2000 Pro
J'utilise la librairie :ADO.NET 2.0 Provider for SQLite
C# 2005 Express
SQLite
TableLines est un champ BLOB avec des donnnées binaires.
Coment récupérer les données qu'il contient ?
Faut-il sauvegarder la dimension du BLOB pour pouvoir dimensionner correctement un tableau de bytes au moment de la récupération ?
Merci
Tintin92
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 using (DbConnection cnn = new SQLiteConnection("Data Source=DBLines.db3")) using (DbCommand cmd = cnn.CreateCommand()) { cmd.CommandText = "SELECT PointPairsList FROM TableLines WHERE PointPairsList IS NOT NULL"; cnn.Open(); using (DbDataReader rd = cmd.ExecuteReader()) { if (rd.Read() == false) throw new ArgumentOutOfRangeException(); rd.GetBytes(0, 0, baSeri, 0, 10); } }
Partager