Home All Groups Group Topic Archive Search About
Author
7 Oct 2005 3:39 PM
vul
I have SQL Server 2000 stored procedure which inserts/update records in
several tables. Now I need to add Image type parameter to that procedure.
It's not a problem.
I have a problem with parameter in VB6 program which uses that SP. All
parameters I have so far look like this for instance:
    Set parTemp2 = New ADODB.Parameter
    parTemp2.Direction = adParamInput
    parTemp2.Type = adInteger
    parTemp2.Name = "@CurrentEmployeeID"
    parTemp2.Value = lngActiveEmployeeID
    cndTemp.Parameters.Append parTemp2

First question - What type should be used for parTemp2.Type ?
Second question - What value should I use for parTemp2.Value ?

Thank you
Al

Author
7 Oct 2005 9:17 PM
Jeff Johnson [MVP: VB]
Show quote Hide quote
"vul" <a**@optonline.net> wrote in message
news:%232PRhV1yFHA.2424@TK2MSFTNGP12.phx.gbl...

>I have SQL Server 2000 stored procedure which inserts/update records in
> several tables. Now I need to add Image type parameter to that procedure.
> It's not a problem.
> I have a problem with parameter in VB6 program which uses that SP. All
> parameters I have so far look like this for instance:
>    Set parTemp2 = New ADODB.Parameter
>    parTemp2.Direction = adParamInput
>    parTemp2.Type = adInteger
>    parTemp2.Name = "@CurrentEmployeeID"
>    parTemp2.Value = lngActiveEmployeeID
>    cndTemp.Parameters.Append parTemp2
>
> First question - What type should be used for parTemp2.Type ?
> Second question - What value should I use for parTemp2.Value ?

I believe you'll want to use adLongVarBinary for the type. As for the Value,
well, are you talking about graphic images or do you just have some binary
data in an array?
Author
10 Oct 2005 5:57 PM
Paul Clement
On Fri, 7 Oct 2005 11:39:59 -0400, "vul" <a**@optonline.net> wrote:

¤ I have SQL Server 2000 stored procedure which inserts/update records in
¤ several tables. Now I need to add Image type parameter to that procedure.
¤ It's not a problem.
¤ I have a problem with parameter in VB6 program which uses that SP. All
¤ parameters I have so far look like this for instance:
¤     Set parTemp2 = New ADODB.Parameter
¤     parTemp2.Direction = adParamInput
¤     parTemp2.Type = adInteger
¤     parTemp2.Name = "@CurrentEmployeeID"
¤     parTemp2.Value = lngActiveEmployeeID
¤     cndTemp.Parameters.Append parTemp2
¤
¤ First question - What type should be used for parTemp2.Type ?
¤ Second question - What value should I use for parTemp2.Value ?
¤

See the following:

How To Read and Write BLOBs Using GetChunk and AppendChunk
http://support.microsoft.com/default.aspx?scid=kb;en-us;194975


Paul
~~~~
Microsoft MVP (Visual Basic)