Application Note for QuNect ODBC for Quick Base

Deleting File Attachments from Quick Base

The following update statement will delete file attachments from four file attachment fields. Setting the value of the file attachment field to the value 'delete' will delete the file attachment in Quick Base. This method will not work when QuNect ODBC for QuickBase is configured to handle file attachment fields as binary fields.

	UPDATE yourdbid SET "File_Attachment_Field_1" = 'delete', "File_Attachment_Field_2" = 'delete', "File_Attachment_Field_3" = 'delete', "File_Attachment_Field_4" = 'delete'
	WHERE "Date_Created" < {ts '2000-01-01 00:00:00'}

Or in SQL Server Management Studio (SSMS) you can use four part names like this:

	UPDATE [QUICKBASE].[AAA_Project_Manager]..[AAA_Project_Manager__Document_Library_bc45c8xjn]
	SET Attachment = 'delete' WHERE Record_ID_ = 302

Or in SQL Server Management Studio (SSMS) you can use OpenQuery like this:

	SELECT * FROM OPENQUERY(QUICKBASE, 'UPDATEOQ bc45c8xjn
	SET Attachment = ''delete'' WHERE Record_ID_ = 302')