I wanna create a procedure that insert information from a form, and in this form, I have to upload an image. I have created the following Insert_procedure, that works only whit all the fields of the form exept the upload button:
CREATE PROCEDURE {databaseOwner}[{objectQualifier}ClientModule_Insert]
@ModuleId int,
@UserID int,
@Name nvarchar(50),
@Adress nvarchar(50),
@Tel1 nvarchar(50),
@Tel2 nvarchar(50),
@Email nvarchar(50),
@Fax nvarchar(50),
@Website nvarchar(50),
@Validated int
AS
INSERT INTO {objectQualifier}ClientModule
(ModuleId, UserID, Name, Adress, Tel1, Tel2, Email, Fax, Website, Validated)
VALUES (@ModuleId,@UserID,@Name,@Adress,@Tel1,@Tel2,@Email,@Fax,@Website,@Validated)
RETURN
GO
I called:
- fileName = FileUpload1.FileName: the file to upload the image
- FileUpload1: the FileUpload control ID
- Logo nvarchar(50): the table colomn that will contain the name of the image
So what should I do to make it work?
If u need any other information that can make it clear, please don't hesitate to ask it!
txs