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

GetOrdinal

GetOrdinal can throw an IndexOutOfRangeException if the named item is not
contained in the datareader.
If i know that occsionally the column wont be in the datareader is there
anyway i can test for its existance without raising an exception.

I know i can try catch the getordinal statement. But its not an exception if
im expecting it to happen often.

Thanks

Kristian

Jul 19 '05 #1
0 2088

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

Similar topics

1
by: Jay Allard | last post by:
Greetings When looping through a SQL Data Reader, it seems that it would be inefficient to call GetOrdinal(fieldname) multiple times. So, I thought I'd assign them to some variables before...
4
by: Lerp | last post by:
Hi all, With regards to calling data from a database and filling in an editing form based on some query, which is the best (least intensive on processor) method for assigning the returned...
9
by: Andy Sutorius | last post by:
Hi, I am receiving the error when compiling the project, "cannot implicitly convert type object to string". The error points to this line of code and underlines the dtrRecipient:...
2
by: sdffsdf | last post by:
Bonjour, je ne comprends pas pourquoi mon code ne fonctionne pas quand j'essaies de recuperer le contenu d'un champ vide dans ma tables Access ... '=== Description de la table ID_Bloc ( INT...
2
by: | last post by:
Using the following against a sql database, I get a system.IndexOutOfRangeException for the column name Add_Date which is valid field name and is a datetime field. All the other columns work ok. ...
0
by: Kristian | last post by:
GetOrdinal can throw an IndexOutOfRangeException if the named item is not contained in the datareader. If i know that occsionally the column wont be in the datareader is there anyway i can test...
5
by: c676228 | last post by:
Hi all, I am stuck with this problem. the code is like this: Dim sqlreader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection) ...
9
by: TF | last post by:
Hello all, I made a ASP.NET 2.0 site that shows possible "recipes" for paint colors stored in an access dbase. Basically, 1000 colors are stored with specific RGB values in separate columns. A...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.