Avatar of bullrout

asked on 

Handling null parameters with stored procedures?

Hi There,

I was wondering if it was possible to have null parameters when executing a stored procedure? I have a form that submits data to SQL Server and one of the fields is an image field and I want the user to be able to leave this field blank if possible. Can I cater for this condition?


@ListingImage Image,
@ListingImageType Nchar(200),

!--page code

Dim plistingImage As New SqlParameter("@ListingImage", SqlDbType.Image)
plistingImage.Value = ImageContent
'image type
Dim plistingImageType As New SqlParameter("@ListingImageType", SqlDbType.Nchar, 200)
plistingImageType.Value = strImageType
Microsoft SQL Server

Avatar of undefined
Last Comment

8/22/2022 - Mon