Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Pass image to SQL Stored Procedure

Reply
Thread Tools

Pass image to SQL Stored Procedure

 
 
Bent Kjeldsen
Guest
Posts: n/a
 
      02-23-2004
Hi.

I would like to upload an image (got File.Binary from ASPUpload) with a
stored procedure.

It works with a normal recordset with new/update and in ASP.NET, but in
Classic ASP, I can't find the right constant in adovbs.inc to use for the
parameter:

Command.Parameters.Append Command.CreateParameter("@FileBlob", ?????,
adParamInput, , File.Binary)

Anyone?

Thanks

Bent
Denmark


 
Reply With Quote
 
 
 
 
John Scragg
Guest
Posts: n/a
 
      02-23-2004
I would guess that it expects a varbinary, but why not let the database tell you what it needs

After you set up your command, use Command.Parameters.Refresh to let ADO query the database for the data types. Then either put in a break point and evaluate the Command.Parameters("@FileBlob").Type to see what ADO came up with

..Refresh has a performance penalt, so once you know the type you can take the .Refresh and evaluation code out and har code in your type

Hope that helps
Joh


----- Bent Kjeldsen wrote: ----

Hi

I would like to upload an image (got File.Binary from ASPUpload) with
stored procedure

It works with a normal recordset with new/update and in ASP.NET, but i
Classic ASP, I can't find the right constant in adovbs.inc to use for th
parameter

Command.Parameters.Append Command.CreateParameter("@FileBlob", ?????
adParamInput, , File.Binary

Anyone

Thank

Ben
Denmar



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bind input text field to pass as parameter to stored procedure in BLL darren.murray2@cingular.com ASP .Net 2 05-24-2007 11:27 PM
Pass NULL To Stored Procedure rn5a@rediffmail.com ASP .Net 2 10-06-2006 11:03 PM
'Procedure or function <stored procedure name> has too many arguments specified',,,ARGH! Mike P ASP .Net 0 06-19-2006 01:19 PM
Pass a Date to stored procedure Mike Lopez ASP .Net Web Services 1 01-25-2005 10:06 PM
Using query string to pass a value to a stored procedure parameter Machelle Chandler ASP .Net Datagrid Control 0 10-20-2003 11:22 PM



Advertisments