freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "martin martin" <acevedoma AT hotmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Problem with dbrpcparam
- Date: Thu, 21 Apr 2005 13:54:28 +0000
Hello, I have some problems passing binary data to stored procedures using db-lib. The parameter is a SYBIMAGE(IMAGE TYPE IN SQLSERVER)
I made something like this
....
ifstream archivo(filename,ios::in|ios::binary|ios::ate);
size=archivo.tellg();
buffer=new char[size];
archivo.seekg(0,ios::beg);
archivo.read(buffer,size);
archivo.close();
hReturn=dbrpcparam(m_dbproc,btName,0,SYBIMAGE,-1,size,(BYTE *) buffer)==SUCCEED;
....
....
if(hReturn && dbrpcsend(m_dbproc)==SUCCEED){
cout<<"Comando enviado"<<endl;
if(dbsqlok(m_dbproc)==SUCCEED){
......
......
the program hangs at dbrpcsend
I changed SYBIMAGE by SYBVARBINARY and it worked but only for files with small size, a 18 bytes images was sended well to the server but a 100KB images was not.
The server received the images very well in second case, in both case the parameter in the server was an IMAGE
CREATE PROCEDURE spVarcharSimple
@par varchar(255)
,@par2 int
,@par3 float
,@par4 as image --problem here
AS
--TESTING PARAMETERS
SELECT @par as resultado
, @par2 as resultado2
,@par3 as resultado3
,@par4 as resultado4
......
Any ideas? Thanks....
-
[freetds] Problem with dbrpcparam,
martin martin, 04/21/2005
- Re: [freetds] Problem with dbrpcparam, Michael Peppler, 04/21/2005
- <Possible follow-up(s)>
- RE: [freetds] Problem with dbrpcparam, Lowden, James K, 04/21/2005
-
RE: [freetds] Problem with dbrpcparam,
Lowden, James K, 04/21/2005
-
RE: [freetds] Problem with dbrpcparam,
Frediano Ziglio, 04/23/2005
-
Re: [freetds] Problem with dbrpcparam,
James K. Lowden, 04/23/2005
-
[freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
Brian Bruns, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
- Re: [freetds] Num of rows ruturned by a query, Frediano Ziglio, 04/29/2005
-
Re: [freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
Brian Bruns, 04/28/2005
-
[freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Problem with dbrpcparam,
James K. Lowden, 04/23/2005
-
RE: [freetds] Problem with dbrpcparam,
Frediano Ziglio, 04/23/2005
Archive powered by MHonArc 2.6.24.