Unix Technical Forum

DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )

This is a discussion on DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 ) within the SQL Server forums, part of the Microsoft SQL Server category; --> Hai all, I am getting an DB_E_ERRORSINCOMMAND exception when I try to open a recordset or execute query in ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 07:43 PM
Prince
 
Posts: n/a
Default DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )

Hai all,

I am getting an DB_E_ERRORSINCOMMAND exception when I try to open a
recordset or execute query in VC++. But when I run the same query in
Query Analyzer, it is working fine. I am sure the connection string is
correct. I am running a collection of queries and finally commit the
transaction, but everytime it not throwing the exception on same query,

eachtime different queries throw exception randomly.


Can anyone tell whats the problem?
Urgent, Please help...
Looking forward for the response..
Thanx in advance...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 07:43 PM
Erland Sommarskog
 
Posts: n/a
Default Re: DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )

Prince (princevictor.moses@gmail.com) writes:
> I am getting an DB_E_ERRORSINCOMMAND exception when I try to open a
> recordset or execute query in VC++. But when I run the same query in
> Query Analyzer, it is working fine. I am sure the connection string is
> correct. I am running a collection of queries and finally commit the
> transaction, but everytime it not throwing the exception on same query,
>
> eachtime different queries throw exception randomly.


It's more likely that there is some error in the calling sequence, rahter
than the SQL code. Without seeing your code, it's impossible to be more
detailed.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 07:43 PM
Prince
 
Posts: n/a
Default Re: DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )

Hi,

Thanx for ur reply..
Is there is any prob in the following query?

INSERT INTO jobhistory(schObjId, BaseLineId, ActionTaken, UserId,
historyDateTime, remarks) VALUES ('_2036', '', 'CREATED', 'Guest',
getDate(), 'Job Created by Guest -- Guest')

looking forward for the response...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 07:43 PM
Erland Sommarskog
 
Posts: n/a
Default Re: DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )

Prince (princevictor.moses@gmail.com) writes:
> Thanx for ur reply..
> Is there is any prob in the following query?
>
> INSERT INTO jobhistory(schObjId, BaseLineId, ActionTaken, UserId,
> historyDateTime, remarks) VALUES ('_2036', '', 'CREATED', 'Guest',
> getDate(), 'Job Created by Guest -- Guest')
>
> looking forward for the response...


If it wasn't clear: I believe the problem is in the C++ code and the call
to ADO, not in the SQL itself.

But let's make a shot in the dark: att SET NOCOUNT ON.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com