473,385 Members | 1,817 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,385 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 2092

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.