Skip to main content

Is there a way to convert an fgdb point file with attachments to sqlserver? Should the photo attachments be stored outside of sqlserver in a separate file? I can convert the point file but how to handle the associated attachments is the problem.

thanks

 

Hi @masonb12​,

SQL Server allows columns of type varbinary_max, which can store your photos as binary data.

One approach would be to use an nvarchar column to store the image name and a varbinary_max column to store the binary of that file. These columns can be populated from the ATT_NAME and DATA fields of the _ATTACH table in the GDB.

When adding the GDB reader in FME, uncheck the Ignore Relationship Info button in the reader Parameters. You will need the info in the _ATTACHREL relationship table to merge the attachments onto the points before writing to SQL Server.


Hi @masonb12​,

SQL Server allows columns of type varbinary_max, which can store your photos as binary data.

One approach would be to use an nvarchar column to store the image name and a varbinary_max column to store the binary of that file. These columns can be populated from the ATT_NAME and DATA fields of the _ATTACH table in the GDB.

When adding the GDB reader in FME, uncheck the Ignore Relationship Info button in the reader Parameters. You will need the info in the _ATTACHREL relationship table to merge the attachments onto the points before writing to SQL Server.

Ok thanks, will give that a try!

Reply