Scimore Company Blog
Ramblings on databases

How to use BLOB data types with ScimoreDB

April 18, 2008 11:23 by scimore

The following sample code shows how to use BLOB data types with ScimoreDB.
The full source code of the sample project, which you can compile and execute, is located under http://www.scimore.com/download/2.5/BlobDemo.zip. The sample uses Scimore embedded database.

Suppose that we already have an established connection with a server.

ScimoreConnection connection;
ScimoreCommand command;

The code snippet showing how to insert an image into a BLOB field:

Bitmap image = SystemIcons.Warning.ToBitmap();
byte[] value = (byte[])TypeDescriptor.GetConverter(image).ConvertTo(image, typeof(byte[]));

command.CommandText = "INSERT INTO table_1 VALUES (@p1)";
ScimoreParameter p1 = new ScimoreParameter("p1", ScimoreDbType.Blob);
p1.Value = value;
command.Parameters.Add(p1);

int rowsAffected = command.ExecuteNonQuery();

And the following code snippet shows how to read data from a BLOB field

command.CommandText = "SELECT column_1 FROM table_1";
ScimoreDataReader reader = command.ExecuteReader();
while (reader.Read())
{
    value = (byte[])reader["column_1"];
    image = (Bitmap)TypeDescriptor.GetConverter(typeof(Bitmap)).ConvertFrom(value);
    image.Save("warning.bmp");
}


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , , , ,
Categories:
Actions: E-mail | Permalink | Comments (7) | Comment RSSRSS comment feed

Documentation updated

March 26, 2008 17:15 by scimore

Documentation has just been updated, and is closed to be finished.

The 2.5 features likes t-sql features, identity, flow control and flush log have been added.

A new minor bug release of the server and manager. We added a feature to the manager, allowing for easier feedback.

And another exciting thing has just happendend yesterday morning. One of the developers reported that he finished the first alpha version of our Visual Studio 2008 integration.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: ,
Categories:
Actions: E-mail | Permalink | Comments (33) | Comment RSSRSS comment feed

"That’s one small step for man, one giant leap for mankind"

March 3, 2008 20:22 by scimore

Ok, we didn't land on the moon, but its still a big release - Version 2.5 is here!!!!

We are very proud of the new release, which is easier to use. Read all about the new features.

Main things are:

  • T-SQL syntax
  • New embedded database interface
  • Free-text
  • and many many more things...

The new release is available from the download section. Go ahead, download, try it and sent us your feedback.

Better documentation of the new features, is on its way.

 


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , ,
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Release Party on its way

January 11, 2008 10:05 by scimore

Work work work. After a long period of working with the nitty gritty things - we are so close to release!

Right now we are dreaming of a RELEASE PARTY!

Everyone will receive information on when & where. Be there or be square!


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5