TIPS N' SAMPLES
Useful tips and samples for software developers
Sunday, February 3, 2013
Set Data Directory [.Net Winforms]
AppDomain.CurrentDomain.SetData("DataDirectory",
System.Environment.GetFolderPath
(System.Environment.SpecialFolder.CommonApplicationData))
Insert binary data (ie. images) into SQL Server without front-end application
CREATE TABLE myTable(Document varbinary(max))
INSERT INTO myTable(Document)
SELECT * FROM
OPENROWSET(BULK N'C:\Image1.jpg', SINGLE_BLOB)
Newer Posts
Home
Subscribe to:
Posts (Atom)