473,406 Members | 2,208 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,406 software developers and data experts.

Oledb, Datasets And Null Rows

I'm trying to build a VB.NET function for an ASP .NET webservice whcih
returns certain data from a database.

I've got to the point where by i can retrieve data from a select query, but
i cannot deal with it if zero rows are returned. I'm convinced there must be
some way of dealing with a zero row dataset but i cannot for the love of god
find out what it is.

So far all i've managed to test is that a DataSet is returned (which is
always will be) using:

"If IsDBNull(dataSet.Table(0)) Then"

But i want to be able to deal with zero rows being returned, i.e. in the
case of a search script. At the moment, whenever Zero rows are returned I
get the error message "There is no row at position 0."

If you need any more information I'd be happy to provide this, Many thanks

Matt
Nov 21 '05 #1
1 1599
"Jumping Matt Flash" <jumpingmattflash@g-mail-.com> schrieb
I'm trying to build a VB.NET function for an ASP .NET webservice
whcih returns certain data from a database.

I've got to the point where by i can retrieve data from a select
query, but i cannot deal with it if zero rows are returned. I'm
convinced there must be some way of dealing with a zero row dataset
but i cannot for the love of god find out what it is.

So far all i've managed to test is that a DataSet is returned (which
is always will be) using:

"If IsDBNull(dataSet.Table(0)) Then"

But i want to be able to deal with zero rows being returned, i.e. in
the case of a search script. At the moment, whenever Zero rows are
returned I get the error message "There is no row at position 0."

If you need any more information I'd be happy to provide this, Many
thanks

if dataSet.tables(0).rows.count = 0 then

Armin
Nov 21 '05 #2

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

Similar topics

0
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is...
2
by: Joe | last post by:
Hi All, I am new to using the Access DB and I need some help if someone is able to give it to me. What I want to do is get the names of the columns of certain tables. Not the data in the table...
1
by: Francis | last post by:
Hello, My question is: is it better to use DataSets than the simple ExecuteNonQuery() methods. I thought the DataSets would be a better structured way of programming, but it seems to result in...
9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
2
by: melanieab | last post by:
Hi, Ok, I'm on my own in learning c# for work here and have come pretty far, but I'm confused by all the options available for datagrids. I have a private datagrid (dg), private dataset (ds), and...
13
by: Ron L | last post by:
I am working on an application that is a front-end for a SQL database. While it is not an immediate requirement, the application will probably be required to be able to connect via the internet at...
0
by: Jumping Matt Flash | last post by:
> I'm trying to build a VB.NET function for an ASP .NET webservice whcih > returns certain data from a database. > > I've got to the point where by i can retrieve data from a select query, > but...
2
by: sloan | last post by:
Back in ADO days, it was fairly easy to get the meta data (tablenames, columnnames , etc) .. with all that schema stuff. I have a Access database, that I'd like to get the list of tableNames in...
6
by: =?Utf-8?B?S3VuIE5pdQ==?= | last post by:
Dear all, I'm trying to use oledb to get the content of an excel file. Now I can use oledb to get the content of a datasheet. But I should know the name of the datasheet in advance. How can I...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.