W
Wayne Wengert
I have a VB ASP.NET page that uploads photos (jpe, jpg or gif) and stores
them in a database table. Things usually work fine but I ran into one image
that causes an error ([SqlException: General network error. Check your
network documentation.]) when I attempt to update the table by adding a row
with the information on that image. Other images I've tried work fine (so
far!). I know it is not a case of the image being too big as the code checks
for a maximum size. Othe images with the same type and larger size work
fine? I have no idea how to track down the problem here? Any suggestions on
how to debug this are appreciated!
Wayne
========= Table Structure ===========
CREATE TABLE [UnitPhotos] (
[UnitID] [int] NOT NULL ,
[Filename] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FileSize] [int] NULL ,
[ContentType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FileData] [image] NULL ,
CONSTRAINT [PK_UnitPhotos] PRIMARY KEY CLUSTERED
(
[UnitID]
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
============== Image Information =============
FileName: sample1.jpe
FileSize: 66484
Content Type: "image/pjpeg"
FileData: <binary>
them in a database table. Things usually work fine but I ran into one image
that causes an error ([SqlException: General network error. Check your
network documentation.]) when I attempt to update the table by adding a row
with the information on that image. Other images I've tried work fine (so
far!). I know it is not a case of the image being too big as the code checks
for a maximum size. Othe images with the same type and larger size work
fine? I have no idea how to track down the problem here? Any suggestions on
how to debug this are appreciated!
Wayne
========= Table Structure ===========
CREATE TABLE [UnitPhotos] (
[UnitID] [int] NOT NULL ,
[Filename] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FileSize] [int] NULL ,
[ContentType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FileData] [image] NULL ,
CONSTRAINT [PK_UnitPhotos] PRIMARY KEY CLUSTERED
(
[UnitID]
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
============== Image Information =============
FileName: sample1.jpe
FileSize: 66484
Content Type: "image/pjpeg"
FileData: <binary>