Hi folks,
I have a huge problem calling a stored proc with a datetime parameter using
ole db (CDynamicParameterAccessor). I used the sample from MSDN (HOWTO: Exec
ute Stored Procedure Using CDynamicParmeterAccesor) as a starting point and
modified the sp "sp_getStudent" so that it gets another parameter @.d datetim
e. But now I'm not able to execute this proc any more: rs.open() returns 0x8
0040e21 (DB_E_ERRORSOCCURRED). What's wrong?!?
Kind regards
Thomas
P.S. Any other kind of third parameter (int, float, ...) works well but date
time (smalldatetime) doesn'tHi Thomas
Your errror seems to be:
DB_E_DATAFIELD_OVERFLOW 80040E21 OLE DB Specific:
The field is too small to accept the amount of data you attempted to add.
Try inserting or pasting less data.
Check the values of the parameters you are passing and (possibly) if you are
mixing the values/parameters up (it is better to add the parameters in the
order in which they are declared!)
John
"Thomas Hein" wrote:
> Hi folks,
> I have a huge problem calling a stored proc with a datetime parameter using ole db
(CDynamicParameterAccessor). I used the sample from MSDN (HOWTO: Execute Stored Pro
cedure Using CDynamicParmeterAccesor) as a starting point and modified the sp "sp_ge
tSt
udent" so that it gets another parameter @.d datetime. But now I'm not able to execute this
proc any more: rs.open() returns 0x80040e21 (DB_E_ERRORSOCCURRED). What's wrong?!?rkred">
> Kind regards
> Thomas
> P.S. Any other kind of third parameter (int, float, ...) works well but da
tetime (smalldatetime) doesn't
>|||The error number refers to an overflow error - since the target column
is smalldatetime, I'd check the date value being put in and make sure
it's a valid smalldatetime (which is quite different than datetime).
valid smalldatetime values are Jan 1, 1900 to June 6, 2079.
Thomas Hein wrote:
> Hi folks,
> I have a huge problem calling a stored proc with a datetime parameter
> using ole db (CDynamicParameterAccessor). I used the sample from MSDN
> (HOWTO: Execute Stored Procedure Using CDynamicParmeterAccesor) as a
> starting point and modified the sp "sp_getStudent" so that it gets
> another parameter @.d datetime. But now I'm not able to execute this proc
> any more: rs.open() returns 0x80040e21 (DB_E_ERRORSOCCURRED). What's
> wrong?!?
> Kind regards
> Thomas
> P.S. Any other kind of third parameter (int, float, ...) works well but
> datetime (smalldatetime) doesn't
>|||Hi John, hi Trey,
thank's for the info - the problem is that I do not make any parameter-bindi
ng on my own, I just call
rs.Create(session, "exec sp_getstudent ?, ? out, ? out");
rs.Prepare();
rs.BindParameters(&rs.m_hParameterAccessor, rs.m_spCommand, &pDummy);
the same way as I do without the datetime parameter, but the next call to
rs.Open(NULL, NULL, false);
returns the error stated below...
Kind regards
Thomas
"Thomas Hein" <thomas.hein@.%nospam%inform-ac.com> schrieb im Newsbeitrag new
s:uledgRAAGHA.2092@.TK2MSFTNGP10.phx.gbl...
Hi folks,
I have a huge problem calling a stored proc with a datetime parameter using
ole db (CDynamicParameterAccessor). I used the sample from MSDN (HOWTO: Exec
ute Stored Procedure Using CDynamicParmeterAccesor) as a starting point and
modified the sp "sp_getStudent" so that it gets another parameter @.d datetim
e. But now I'm not able to execute this proc any more: rs.open() returns 0x8
0040e21 (DB_E_ERRORSOCCURRED). What's wrong?!?
Kind regards
Thomas
P.S. Any other kind of third parameter (int, float, ...) works well but date
time (smalldatetime) doesn't|||Hi
I assume that you are setting the first parameter as in the example code?
Does SQL profiler show anything?
John
"Thomas Hein" wrote:
> Hi John, hi Trey,
> thank's for the info - the problem is that I do not make any parameter-bin
ding on my own, I just call
> rs.Create(session, "exec sp_getstudent ?, ? out, ? out");
> rs.Prepare();
> rs.BindParameters(&rs.m_hParameterAccessor, rs.m_spCommand, &pDummy);
> the same way as I do without the datetime parameter, but the next call to
> rs.Open(NULL, NULL, false);
> returns the error stated below...
> Kind regards
> Thomas
> "Thomas Hein" <thomas.hein@.%nospam%inform-ac.com> schrieb im Newsbeitrag
news:uledgRAAGHA.2092@.TK2MSFTNGP10.phx.gbl...
> Hi folks,
> I have a huge problem calling a stored proc with a datetime parameter using ole
db (CDynamicParameterAccessor). I used the sample from MSDN (HOWTO: Execute Stored P
rocedure Using CDynamicParmeterAccesor) as a starting point and modified the sp "sp_
get
Student" so that it gets another parameter @.d datetime. But now I'm not able to execute thi
s proc any more: rs.open() returns 0x80040e21 (DB_E_ERRORSOCCURRED). What's wrong?!?darkred">
> Kind regards
> Thomas
> P.S. Any other kind of third parameter (int, float, ...) works well but
datetime (smalldatetime) doesn't
>|||I concur with John - you'll need to run Profiler to see what's acutally
being passed to sql server.
Since you're getting the parameter values from the UI, I even more
confident that you're getting an invalid smalldatetime value.
Thomas Hein wrote:
> Hi John, hi Trey,
> thank's for the info - the problem is that I do not make any
> parameter-binding on my own, I just call
> rs.Create(session, "exec sp_getstudent ?, ? out, ? out");
> rs.Prepare();
> rs.BindParameters(&rs.m_hParameterAccessor, rs.m_spCommand, &pDummy);
> the same way as I do without the datetime parameter, but the next call to
> rs.Open(NULL, NULL, false);
> returns the error stated below...
> Kind regards
> Thomas
>
> "Thomas Hein" <thomas.hein@.%nospam%inform-ac.com
> <mailto:thomas.hein@.%nospam%inform-ac.com>> schrieb im Newsbeitrag
> news:uledgRAAGHA.2092@.TK2MSFTNGP10.phx.gbl...
> Hi folks,
> I have a huge problem calling a stored proc with a datetime
> parameter using ole db (CDynamicParameterAccessor). I used the
> sample from MSDN (HOWTO: Execute Stored Procedure Using
> CDynamicParmeterAccesor) as a starting point and modified the sp
> "sp_getStudent" so that it gets another parameter @.d datetime. But
> now I'm not able to execute this proc any more: rs.open() returns
> 0x80040e21 (DB_E_ERRORSOCCURRED). What's wrong?!?
> Kind regards
> Thomas
> P.S. Any other kind of third parameter (int, float, ...) works well
> but datetime (smalldatetime) doesn't
>
Showing posts with label ole. Show all posts
Showing posts with label ole. Show all posts
Sunday, March 25, 2012
Thursday, March 22, 2012
Calling Oracle Stored Proc from SqlServer
I am trying to call an Oracle stored procedure from SqlServer. I have tried
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSLHimm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
Message posted via http://www.droptable.comsql
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSLHimm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
Message posted via http://www.droptable.comsql
Calling Oracle Stored Proc from SqlServer
I am trying to call an Oracle stored procedure from SqlServer. I have tried
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSLHimm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
--
Message posted via http://www.sqlmonster.com
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSLHimm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
--
Message posted via http://www.sqlmonster.com
Calling Oracle Stored Proc from SqlServer
I am trying to call an Oracle stored procedure from SqlServer. I have tried
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSL
Himm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
Message posted via http://www.droptable.com
both the MS and Oracle OLE DB Providers.
I can select records from Oracle and I can insert records to Oracle. The
stored proc call dies.
The interesting part in this is that I can write a VB script that calls the
stored procedure from the server that the SqlServer instance is running on
and it is able to execute the proc. The VB script uses Oracle's OLE DB
Provider.
We are using SqlServer 2000 and Oracle 9.2.0.6
I am sure that there is something setup incorrectly with SqlServer.
Any ideas
RSL
Himm?
So i think u must use sp_OACreate, sp_OAMethod, sp_OADestroy methods in sql
server procedures or triggers.
First, make a dll for oracle actions. And call dll in sql server t-sql with
those method.
Message posted via http://www.droptable.com
Wednesday, March 7, 2012
Call Stored Procedure AS400 From SQL Server
Hi,
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's
Portekoi
Hi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=SQ...g=d&hl=en&lr=&
you may want to try the oledb driver:
http://msdn.microsoft.com/library/de..._db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegro ups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's
>
> Portekoi
>
|||I can't help you with your problem, But I sure love to know how you configured your linked server.
I am using Client Access Express and can't find any documentation for what the Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's
Portekoi
Hi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=SQ...g=d&hl=en&lr=&
you may want to try the oledb driver:
http://msdn.microsoft.com/library/de..._db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegro ups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's
>
> Portekoi
>
|||I can't help you with your problem, But I sure love to know how you configured your linked server.
I am using Client Access Express and can't find any documentation for what the Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
Call Stored Procedure AS400 From SQL Server
Hi,
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's :)
PortekoiHi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=SQL0107&start=0&scoring=d&hl=en&lr=&
you may want to try the oledb driver:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/his_2004Main/htm/_sna_distributed_query_support_using_the_ole_db_provider_for_db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegroups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's :)
>
> Portekoi
>|||I can't help you with your problem, But I sure love to know how you configured your linked server.
I am using Client Access Express and can't find any documentation for what the Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
--
---
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
---
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's :)
PortekoiHi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=SQL0107&start=0&scoring=d&hl=en&lr=&
you may want to try the oledb driver:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/his_2004Main/htm/_sna_distributed_query_support_using_the_ole_db_provider_for_db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegroups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's :)
>
> Portekoi
>|||I can't help you with your problem, But I sure love to know how you configured your linked server.
I am using Client Access Express and can't find any documentation for what the Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
--
---
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
---
Call Stored Procedure AS400 From SQL Server
Hi,
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's
PortekoiHi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=S...ng=d&hl=en&lr=&
you may want to try the oledb driver:
_sna_distributed_query_support_using_the
_ole_db_provider_for_db2_oledb.asp" target="_blank">http://msdn.microsoft.com/library/d...r_db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegroups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSerie
s
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's
>
> Portekoi
>|||I can't help you with your problem, But I sure love to know how you configur
ed your linked server.
I am using Client Access Express and can't find any documentation for what t
he Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
--
---
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
---
I have SQL Server 7 with a link server.
When i try to execute a SP from SQL Server, i have this error :
[ OLE/DB provider returned message: [ IBM][Pilote ODBC iSeries
Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
maximum are accepted. ]
I try this : exec recette.recette.pack14rexe.idcb050
I think that it's the '.' but i've try to change with '/' but i have an
another error...
Can you help me?
Thank's
PortekoiHi
I don't know specifically about your error, but there seems to be similar
issue with MS Query and the ODBC driver
http://groups.google.com/groups?q=S...ng=d&hl=en&lr=&
you may want to try the oledb driver:
_sna_distributed_query_support_using_the
_ole_db_provider_for_db2_oledb.asp" target="_blank">http://msdn.microsoft.com/library/d...r_db2_oledb.asp
or possibly use OPENQUERY (if you do return a rowset from the stored
procedure or add a dummy one to the query).
See also http://support.microsoft.com/kb/218590/
John
"Portekoi" <portekoi@.passion-cinquieme.com> wrote in message
news:1138975377.316513.28700@.g49g2000cwa.googlegroups.com...
> Hi,
> I have SQL Server 7 with a link server.
> When i try to execute a SP from SQL Server, i have this error :
> [ OLE/DB provider returned message: [ IBM][Pilote ODBC iSerie
s
> Access][DB2 UDB]SQL0107 - "pack14rexe" is too long. 10 characters
> maximum are accepted. ]
> I try this : exec recette.recette.pack14rexe.idcb050
> I think that it's the '.' but i've try to change with '/' but i have an
> another error...
> Can you help me?
> Thank's
>
> Portekoi
>|||I can't help you with your problem, But I sure love to know how you configur
ed your linked server.
I am using Client Access Express and can't find any documentation for what t
he Product Name, Provider String
and Data Source Should be.
Thanks,
Johnny
--
---
Posted with NewsLeecher v3.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
---
Subscribe to:
Posts (Atom)