Click here to Skip to main content
15,919,774 members
Home / Discussions / Database
   

Database

 
GeneralSQLObjectListPtr Pin
ranjjj17-Nov-03 3:14
ranjjj17-Nov-03 3:14 
GeneralSQLObjectListPtr Pin
ranjjj17-Nov-03 3:14
ranjjj17-Nov-03 3:14 
Generalsqldmo.tlh Pin
ranjjj16-Nov-03 22:33
ranjjj16-Nov-03 22:33 
Generallistdatabasepermissions Pin
ranjjj15-Nov-03 23:53
ranjjj15-Nov-03 23:53 
GeneralLoad a file into a binary column in SQL server Pin
CillyMe15-Nov-03 17:32
CillyMe15-Nov-03 17:32 
GeneralRe: Load a file into a binary column in SQL server Pin
mhmoud rawas15-Nov-03 18:39
mhmoud rawas15-Nov-03 18:39 
GeneralRe: Load a file into a binary column in SQL server Pin
CillyMe16-Nov-03 22:32
CillyMe16-Nov-03 22:32 
GeneralLoad a file into a binary column in SQL server Pin
CillyMe15-Nov-03 17:31
CillyMe15-Nov-03 17:31 
There're plenty of articles that shows you how to load a disk file/binary from ASP frontend and insert it into a binary column in SQL server. But, is there a stored procedure that can load file/binary from disk WITHOUT ASP or relying on external component?

QUESTION 1:
If that's possible, I can create a simple stored procedure to insert binary file into a binary column. Pseudo code:

CREATE PROCEDURE sproc_UpdateMessageAttachment
@msgID uniqueidentifier
@inputfile varchar(100),
@status binary[50000] OUTPUT
AS
BEGIN
DECLARE @binaryattachment binary[50000]
EXEC sp_loadfile @inputfile, @binary OUTPUT --Of course, I made this up. The question is whether such stored

procedure exists.

UPDATE messages
SET Attachment = @binaryattachment
WHERE msgID=@msgID
END

QUESTION 2:
Is there alternative to this? Can I instantiate/call method on a COM component from within body of stored procedure?

And if I can what component would I need in this case?

Thanks.


Reference from www.stardeveloper.com:
1. Classical ASP http://stardeveloper.com/articles/display.html?article=2001033101&page=1
2. ASP.NET
a. http://stardeveloper.com/articles/display.html?article=2003022601&page=1
b. http://stardeveloper.com/articles/display.html?article=2003031201&page=1
GeneralRe: Load a file into a binary column in SQL server Pin
Jeff Varszegi18-Nov-03 5:38
professionalJeff Varszegi18-Nov-03 5:38 
GeneralSQL Server Date Problem Pin
sim_san15-Nov-03 1:16
sim_san15-Nov-03 1:16 
GeneralRe: SQL Server Date Problem Pin
Mike Dimmick15-Nov-03 1:55
Mike Dimmick15-Nov-03 1:55 
GeneralRe: SQL Server Date Problem Pin
sim_san17-Nov-03 6:40
sim_san17-Nov-03 6:40 
GeneralRe: SQL Server Date Problem Pin
Mike Dimmick17-Nov-03 6:54
Mike Dimmick17-Nov-03 6:54 
GeneralRe: SQL Server Date Problem Pin
sim_san22-Nov-03 6:23
sim_san22-Nov-03 6:23 
GeneralRe: SQL Server Date Problem Pin
Anonymous21-Nov-03 5:45
Anonymous21-Nov-03 5:45 
GeneralsqlDataAdapter Wizard does not Update Pin
Bruce L. Scheffler14-Nov-03 11:39
sussBruce L. Scheffler14-Nov-03 11:39 
GeneralJoin Pin
Anonymous14-Nov-03 8:25
Anonymous14-Nov-03 8:25 
GeneralRe: Join Pin
jeff_martin14-Nov-03 9:52
jeff_martin14-Nov-03 9:52 
GeneralRe: Join Pin
Anonymous17-Nov-03 2:39
Anonymous17-Nov-03 2:39 
Generalsql Pin
ranjjj13-Nov-03 17:18
ranjjj13-Nov-03 17:18 
GeneralAccess Query Pin
bgeroux13-Nov-03 16:25
bgeroux13-Nov-03 16:25 
GeneralRe: Access Query Pin
Hesham Amin13-Nov-03 21:28
Hesham Amin13-Nov-03 21:28 
GeneralRe: Access Query Pin
Roger Wright14-Nov-03 3:14
professionalRoger Wright14-Nov-03 3:14 
GeneralRe: Access Query Pin
bgeroux14-Nov-03 3:43
bgeroux14-Nov-03 3:43 
GeneralRe: Access Query Pin
Roger Wright14-Nov-03 4:19
professionalRoger Wright14-Nov-03 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.