Showing posts with label inquery. Show all posts
Showing posts with label inquery. Show all posts

Sunday, March 25, 2012

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...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/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||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...|||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/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

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...Vodafone (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.
There is answer in comp.databases.ms-sqlserver. Please do not post the
same question independently to several newsgroups.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

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...
Hi
Have you printed out the SQL Statement before you send it to the server? You
may want to use SQL Profiler to see what/if anything is being sent to the
server.
Have you also checked out
http://support.microsoft.com/default...b;en-us;18189?
John
"Prince" wrote:

> 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...
>
|||Hai,
Thanx for ur reply...
In ran the query from Profiler, it works fine... and the URL that u
provide doesnt works...
Looking forward for the response...
John Bell wrote:
[vbcol=seagreen]
> Hi
> Have you printed out the SQL Statement before you send it to the server? You
> may want to use SQL Profiler to see what/if anything is being sent to the
> server.
> Have you also checked out
> http://support.microsoft.com/default...b;en-us;18189?
> John
> "Prince" wrote:
|||Hi
Try http://support.microsoft.com/kb/181890
You may want to check MDAC versions.
John
"Prince" wrote:

> Hai,
> Thanx for ur reply...
> In ran the query from Profiler, it works fine... and the URL that u
> provide doesnt works...
> Looking forward for the response...
>
> John Bell wrote:
>
>

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...Hi
Have you printed out the SQL Statement before you send it to the server? You
may want to use SQL Profiler to see what/if anything is being sent to the
server.
Have you also checked out
http://support.microsoft.com/defaul...kb;en-us;18189?
John
"Prince" wrote:

> 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...
>|||Hai,
Thanx for ur reply...
In ran the query from Profiler, it works fine... and the URL that u
provide doesnt works...
Looking forward for the response...
John Bell wrote:
[vbcol=seagreen]
> Hi
> Have you printed out the SQL Statement before you send it to the server? Y
ou
> may want to use SQL Profiler to see what/if anything is being sent to the
> server.
> Have you also checked out
> http://support.microsoft.com/defaul...kb;en-us;18189?
> John
> "Prince" wrote:
>|||Hi
Try http://support.microsoft.com/kb/181890
You may want to check MDAC versions.
John
"Prince" wrote:

> Hai,
> Thanx for ur reply...
> In ran the query from Profiler, it works fine... and the URL that u
> provide doesnt works...
> Looking forward for the response...
>
> John Bell wrote:
>
>sql