2

Recently I was up scaling from MS Access to SQL Server (back end).

Everything up sized smoothly using the wizard. I only have one problem, when trying to access the pictures that were stored in SQL Server in MS Access (Front End).

Before up scaling to SQL Server, I had the image stored as an attachment on MS Access which caused a problem as SQL Server does not support multivalued columns and it was converting the data type to ntext (in the up scaling process). Then I tackled this problem by storing all the multi valued (picture/attachment) in a table on it's own and referring to the owner by a fk. The newly created table have these properties ID_number PK text, FileData OLE OBJECT, FileName text, FileType text

All of these correspond to the table dbo.IMAGE on SQL Server linked with MS Access with and ODBC connection. The properties found in this tables are :

ID_number nvarchar, FileData Image, 
FileName nvarchar, FileType nvarchar 

Is there anyway to get the image to display on a MS access form as I'm having trouble loading the image from SQL Server. I did some research and found out that I have to use GetChunk And AppendChunk methods but I don't no where to start.

Monroy
  • 420
  • 5
  • 19
  • 1
    Start with picking the **most appropriate** datatype! `ntext`, `text`, and `image` data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use `nvarchar(max)`, `varchar(max)`, and `varbinary(max)` instead. [See details here](http://msdn.microsoft.com/en-us/library/ms187993.aspx) – marc_s Sep 23 '15 at 11:39
  • Thanks for pointing this out, although I already read this article, I had some problems to change the mapping values from MS access to SQL Server but I could change Image to varbinary(max) but I have no idea how to display a varbinary(max) into an image control source (Access). I'm already using nvarchar(max) on MS Sql Server which is connected to Access (Front end) – Monroy Sep 23 '15 at 11:48

0 Answers0