473,586 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQladapter not returning value

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
4 1365
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
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
Hi,

his is the code which i am using

public decimal[] RetrieveReturnR ange()
{

decimal[] RangeValues = new decimal[2];

m_command.Comma ndText = "[sp_GetRange]";

m_command.Comma ndType = CommandType.Sto redProcedure;
m_command.Conne ction = m_connection;

DataTable RefundValueDT = new DataTable();

m_adaptor.Fill( RefundValueDT);
DataRow[] dr = RefundValueDT.S elect("","Refun dValue");
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1977
by: Newbee Adam | last post by:
how to save textbox values to 2 tables using sqladapter I am new with this. Do I need to ADO.net? what is the simplist correct way? or can I write a query in my vb.net form insert table Machine_Count(MachName, CoinsIn) values(txtMachineName(1).Text, txtCoinsIn(1).Text)
11
409
by: Newbee Adam | last post by:
I am new to vb.net coming from vb6 (intermediate level) 1. I am trying to wrap my mind around when I would use ADO.Net and when to use sqladapter. 2.can I use sqldataadapter in web app?
2
1577
by: lekshmi | last post by:
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...
3
1029
by: lekshmi | last post by:
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...
1
1094
by: Steve Jacklin | last post by:
How do I link a TreeView Control to an SQLAdapter?
4
275
by: lekshmi | last post by:
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...
1
3665
by: Hrvoje Voda | last post by:
How to refresh dataset and sqladapter after using store procedure? I tried to call update on sqladapter but it doesn't work. Only when I close program and call it again a change is visible. Hrcko
0
939
by: jincep | last post by:
can you tell me how to configure sql adapter in vb.net 2005. i know to configure in 2003 by right clicking sqladapter -->properties, we can. but when i right click the same properties in 2005 it shows only the properties. can u help me how it is?
1
2682
by: DaveL | last post by:
I have 2 rows in a datatable When i Adapter.Update(mytable) i get Update requires valid update command error When In Fact I am Inserting SqlAdapter ad = new SqlDataAdapter() ad.InsertCommand=new SqlCommand(); string sInsert="Insert into mytable (field1,field2) values(@field1,@field2) ..
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.