Link to home
Start Free TrialLog in
Avatar of jackjohnson44
jackjohnson44

asked on

save file to database vb.net vs2005

I have the prototype of a screen where someone can browse for a file.  It is supposed to be imported into the table below.  I plan to use a dataset built in the designer.  How do I save the file to the db?

CREATE TABLE [Banks].[tblBankAttachments](
      [BankAttachmentGUID] [PCA].[UDT_GUID] NOT NULL,
      [BankGUID] [PCA].[UDT_GUID] NOT NULL,
      [Filename] [varbinary](50) NOT NULL,
      [Filedescription] [nchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
      [FileSize] [int] NOT NULL,
      [FileText] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
      [CreatedOn] [datetime] NOT NULL,
      [CreatedBy] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 CONSTRAINT [PK_tblBankAttachments] PRIMARY KEY CLUSTERED
ASKER CERTIFIED SOLUTION
Avatar of VBRocks
VBRocks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jackjohnson44
jackjohnson44

ASKER

thanks,

sql, but how do I get a file into the variable or check the size?

If I start with a file browse dialogue, where do I go from there?
What type of a data file are they opening up?  A CSV (comma separated value) file, XML, a TXT file, etc?