473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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...

Mar 15 '06 #1
3 8409
Prince (pr****************@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, es****@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
Mar 15 '06 #2
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...

Mar 15 '06 #3
Prince (pr****************@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, es****@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
Mar 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lakshmi | last post by:
Hi We are rewriting a COM object in C#. The COM object returns HRESULT for invalid arguments, null values etc. The HRESULT is created using the MAKE_HRESULT macro in C++. 1.What is the C#...
1
by: Kimmo Laine | last post by:
Hi, we have a (unmanaged) ATL COM server, which implements two interface: ITestInterface1 and ITestInterface2. Both of these interfaces also support the ISupportErrorInfo-interface. Interface...
1
by: Display Name | last post by:
Exception class has HRESULT as protected member. Is there a header file or tool to get the entire mapping of C# Exception to HRESULT? Any tools / header file / links appreciated
1
by: Manoj | last post by:
Hi, In our application we reference com components written in c++.When errors occur the messages appear like this 'Exception from HRESULT: 0xC0068002" is there a way to convert this HResult...
4
by: KC | last post by:
Is this Exception from HRESULT: 0x800401A8 an error or a bug? I've been trying to build a chart in Excel through VB.net (which isn't documented) so I'm running completely blind. What examples...
4
by: cpajoe2001 | last post by:
I am not sure if this is the proper place to put this thread but I have run into a road block. I am writing a web app that will create groups in Active Directory then add users to those groups. I...
6
by: =?Utf-8?B?Um9i?= | last post by:
Hi, If I call my own DLL from Javascript, a HRESULT is returned. Javascript cannot cast this to an integer. Is there any other way of typecasting this returnvalue to integer, wihout using the...
3
by: wundertier | last post by:
Hi, I'm accessing COM objects from C#.net. In case of error a COMException is thrown which includes the HRESULT. But how do I get the description for the HRESULT? The Message property of the...
11
by: Academia | last post by:
I've been Googling and there is many many hits but I can't find what I want. I've read at one time how DotNET treats HRESULT but can't find it now. Does it return HRESULT unchanged or does it...
4
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.