By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

SQladapter not returning value

P: n/a
Hi,

I have an application written in .Net and my database is
SQLserver. In my application i am using SqlAdapters to
get the values from the database. But sometimes, values
are not returned properly to these adapters and there are
no exceptions also. At this time, all database queries
will fail and the solution to this is restart the machine
(the client, not the sqlserver)

Could this be a problem with the connection pooling?

How should i proceed to nail down the problem?

Thanks,
Lekshmi
..
Jul 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Lekshmi,

How are you so sure of this.
But sometimes, values
are not returned properly to these adapters and there are
no exceptions also. At this time, all database queries
will fail and the solution to this is restart the machine


For me it sound more as something not well done in the code.

However it can be everywhere of course.

I never saw this stated in the dotNet newsgroups as you tell it..

Cor
Jul 21 '05 #2

P: n/a
Hi lekshmi,

The problem sounds quite strange.
I have an application written in .Net and my database is
SQLserver. In my application i am using SqlAdapters to
get the values from the database. But sometimes, values
are not returned properly to these adapters and there are
no exceptions also. At this time, all database queries
will fail
Sounds like the culprit is the SQL server. You might need to check the
server memory usage.
and the solution to this is restart the machine
(the client, not the sqlserver)

Could this be a problem with the connection pooling?
As Cor pointed out, the code be the issue if the client needs a restart.
Can you recreate the issue and say when exactly this happens. This might
help us to zero down.

appy Coding

"lekshmi" wrote:
Hi,

I have an application written in .Net and my database is
SQLserver. In my application i am using SqlAdapters to
get the values from the database. But sometimes, values
are not returned properly to these adapters and there are
no exceptions also. At this time, all database queries
will fail and the solution to this is restart the machine
(the client, not the sqlserver)

Could this be a problem with the connection pooling?

How should i proceed to nail down the problem?

Thanks,
Lekshmi
..

Jul 21 '05 #3

P: n/a
Hi,

his is the code which i am using

public decimal[] RetrieveReturnRange()
{

decimal[] RangeValues = new decimal[2];

m_command.CommandText = "[sp_GetRange]";

m_command.CommandType = CommandType.StoredProcedure;
m_command.Connection = m_connection;

DataTable RefundValueDT = new DataTable();

m_adaptor.Fill(RefundValueDT);
DataRow[] dr = RefundValueDT.Select("","RefundValue");
return dr
}

the stored procedure should ideally return one column
which has 2 rows from a look up table. this table will
always have 2 rows. the application runs fine most of the
times. but some times, say twice in a week ( frequency
not constant) the application will start throwing errors.
the value returned from the stored procedure will be
either null or some junk value. at this time, all the
queries to the database fails and we have to restart the
server mostly. but there are times when the problem will
get resolved by its own (say, after some 15 minutes).
this procedure is only a sample. Since this is the most
commonly used procedure, in the application during the
problem time, most of the errors are thrown by this
procedure.

Could some one help me out?

Thanks,
Lekshmi
-----Original Message-----
Hi lekshmi,

The problem sounds quite strange.
I have an application written in .Net and my database is SQLserver. In my application i am using SqlAdapters to
get the values from the database. But sometimes, values are not returned properly to these adapters and there are no exceptions also. At this time, all database queries
will fail
Sounds like the culprit is the SQL server. You might

need to check theserver memory usage.
and the solution to this is restart the machine
(the client, not the sqlserver)

Could this be a problem with the connection pooling?
As Cor pointed out, the code be the issue if the client

needs a restart.Can you recreate the issue and say when exactly this happens. This mighthelp us to zero down.

appy Coding

"lekshmi" wrote:
Hi,

I have an application written in .Net and my database is SQLserver. In my application i am using SqlAdapters to
get the values from the database. But sometimes, values are not returned properly to these adapters and there are no exceptions also. At this time, all database queries
will fail and the solution to this is restart the machine (the client, not the sqlserver)

Could this be a problem with the connection pooling?

How should i proceed to nail down the problem?

Thanks,
Lekshmi
..

.

Jul 21 '05 #4

P: n/a
Lekshmi,

I would expect that you would have

return RangeValues,

whatever that is because it is completly unused,

however you return the datarow while the return type is an array of
decimals.

Cor
Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.