PostgreSQL Bytea to String
Category:
DatabaseType:
ModulesDifficulty:
AdvancedAuthor:
Christopher RhodesVersion Compatibility: Visual Basic 6, Visual Basic 5, Visual Basic.NET
More information:
Written by Marketing Solutions, Inc., the functions below will create a Bytea escaped string for inputing binary information into a type bytea column in PostgreSQL.
FileToByteaString will take a file name, read the content, and then output a bytea escaped string for proper insertion into the database.
PQescapeByteaToString will take a Byte array and convert it to bytea escaped string for proper insertion into the database.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: