I have this INSERT

INSERT INTO BLOBTest
(BLOBName, BLOBData)
SELECT 'First test file',
BulkColumn FROM OPENROWSET(
Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB

I want to add id, but it returns a mistake

something like:

INSERT INTO BLOBTest
(id , BLOBName, BLOBData)
/if write "1," it returns a syntax error/
SELECT 'First test file',
BulkColumn FROM OPENROWSET(
Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB

Please help meHE

Make ID an auto-increment integer and a required key and it will fill the field in for you without having to insert it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.