如何使用VB.NET将图像存储在MySQL数据库中?

时间:2022-09-27 20:42:21

How can I store an image in a MySQL database using VB.NET? Could you show some examples that use the INSERT command?

如何使用VB.NET将图像存储在MySQL数据库中?你能展示一些使用INSERT命令的例子吗?

4 个解决方案

#1


Use the BLOB type.

使用BLOB类型。

http://forums.mysql.com/read.php?38,6172,15703

#2


Depending on the size of the Image data that you are saving, you'll want to use one of the flavors of the BLOB:

根据您保存的图像数据的大小,您将需要使用BLOB的一种风格:

I think the max sizes on them are:

我认为它们的最大尺寸是:

BLOB - 64KB max

BLOB - 最大64KB

MEDIUM BLOB - 16 MB max

MEDIUM BLOB - 最大16 MB

LARGE BLOB - 4 GB max

大BLOB - 最大4 GB

#3


I believe the best way to store something like an image in a database is with a BLOB field (Binary Large Object), which is basically just a chunk of data.

我相信在数据库中存储类似图像的最佳方法是使用BLOB字段(二进制大对象),它基本上只是一大块数据。

Hope this is some help.

希望这是一些帮助。

#4


You can try AccessImagine (http://access.bukrek.net), all you need to do is to bind it to some BLOB field in Properties Inspector.

您可以尝试AccessImagine(http://access.bukrek.net),您需要做的就是将它绑定到Properties Inspector中的某个BLOB字段。

#1


Use the BLOB type.

使用BLOB类型。

http://forums.mysql.com/read.php?38,6172,15703

#2


Depending on the size of the Image data that you are saving, you'll want to use one of the flavors of the BLOB:

根据您保存的图像数据的大小,您将需要使用BLOB的一种风格:

I think the max sizes on them are:

我认为它们的最大尺寸是:

BLOB - 64KB max

BLOB - 最大64KB

MEDIUM BLOB - 16 MB max

MEDIUM BLOB - 最大16 MB

LARGE BLOB - 4 GB max

大BLOB - 最大4 GB

#3


I believe the best way to store something like an image in a database is with a BLOB field (Binary Large Object), which is basically just a chunk of data.

我相信在数据库中存储类似图像的最佳方法是使用BLOB字段(二进制大对象),它基本上只是一大块数据。

Hope this is some help.

希望这是一些帮助。

#4


You can try AccessImagine (http://access.bukrek.net), all you need to do is to bind it to some BLOB field in Properties Inspector.

您可以尝试AccessImagine(http://access.bukrek.net),您需要做的就是将它绑定到Properties Inspector中的某个BLOB字段。