Click here to Skip to main content
15,900,108 members

Comments by Mare7 (Top 24 by date)

Mare7 27-Aug-13 23:39pm View    
Hi, I change the code a little and it works. Thank You very much.

heres my code:

Dim FilePath As String = path + tFileName

and i added it in the insert statement in my query n i got the filepath and the file name.

Thx again
Mare7 2-Aug-13 3:50am View    
thx RedDk, now i already solve the problem. thx again
Mare7 2-Aug-13 1:29am View    
really? but if i write it in the front end, it will get really messy..but u r rite..i shouldnt do it in the stored procedure..so u got example or link related?
Mare7 1-Aug-13 5:04am View    
tq very much. ill try rewrite it in my code and see the result soon. i'll reply here again and vote once i got the result. thx again..i really appreciate it^^
Mare7 1-Aug-13 4:39am View    
DB_B
CREATE TABLE [Aduan].[ComplaintFiles](
[ComplaintFileID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[ComplaintID] [nvarchar](50) NOT NULL,
[ResponseID] [nvarchar](50) NULL,
[FileName] [varchar](100) NOT NULL,
[Description] [varchar](255) NOT NULL,
[FileExtension] [nvarchar](5) NOT NULL,
[FileType] [nvarchar](5) NOT NULL,
[Cid] [nvarchar](50) NOT NULL,
[Cdt] [datetime] NOT NULL,
CONSTRAINT [PK_ComplaintFiles] PRIMARY KEY CLUSTERED
(
[ComplaintFileID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Refer to Complaint.ComplaintID' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'ComplaintID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Refer to ComplaintResponse.ResponseID. If attachment done during Response Conversation store the ResponseID' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'ResponseID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Desciption of the file entered by user' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'Description'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'File Extension' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'FileExtension'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'C- Complainant File or A- Answer from Officer' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'FileType'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Login user ID' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'Cid'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created Date. System Date(i.e. Database Server system date)' , @level0type=N'SCHEMA',@level0name=N'Aduan', @level1type=N'TABLE',@level1name=N'ComplaintFiles', @level2type=N'COLUMN',@level2name=N'Cdt'
GO

ALTER TABLE [Aduan].[ComplaintFiles] WITH CHECK ADD CONSTRAINT [FK_ComplaintFiles_Complaint] FOREIGN KEY([ComplaintID])
REFERENCES [Aduan].[Complaint] ([ComplaintID])
GO

ALTER TABLE [Aduan].[ComplaintFiles] CHECK CONSTRAINT [FK_ComplaintFiles_Complaint]
GO

ALTER TABLE [Aduan].[ComplaintFiles] WITH CHECK ADD CONSTRAINT [FK_ComplaintFiles_ComplaintResponse] FOREIGN KEY([ResponseID])
REFERENCES [Aduan].[ComplaintResponse] ([ResponseID])
GO

ALTER TABLE [Aduan].[ComplaintFiles] CHECK CONSTRAINT [FK_ComplaintFiles_ComplaintResponse]
GO

ALTER TABLE [Aduan].[ComplaintFiles] ADD CONSTRAINT [DF_ComplaintFiles_FileType] DEFAULT (N'''C"') FOR [FileType]
GO