Re: SqlDataAdapter.Fill throws me an IndexOutOfRangeException
From: Val Mazur (group51a_at_hotmail.com)
Date: 11/17/04
- Next message: Val Mazur: "Re: Very strange problem!"
- Previous message: Cindy Winegarden: "Re: FoxPro ... ODBC ... Help !!"
- In reply to: Uri Dor: "SqlDataAdapter.Fill throws me an IndexOutOfRangeException"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 18:47:04 -0500
Hi,
You showed us what you have on a server side, but actually did not show the
code, which throws the exception. What is this code?
-- Val Mazur Microsoft MVP "Uri Dor" <tablul@newsgroups.nospam> wrote in message news:O%23JRb$KzEHA.2200@TK2MSFTNGP09.phx.gbl... > for some reason, a specific database state gives me an > IndexOutOfRangeException when I call SqlDataAdapter.Fill (in several cases > the same code doesn't throw the exception) > > the SELECT is: > SELECT Bank_sec_code, Dt, Par_val, Rate, Rate_nis FROM dbo.Common_rates > WHERE (Dt = @dt) > > I supply a valid @dt parameter > > when I run the query from query analyzer I get a valid, nonempty result. > > when I script the table I get: > if exists (select * from dbo.sysobjects where id = > object_id(N'[dbo].[Common_rates]') and OBJECTPROPERTY(id, N'IsUserTable') > = 1) > drop table [dbo].[Common_rates] > GO > > CREATE TABLE [dbo].[Common_rates] ( > [Bank_sec_code] [int] NOT NULL , > [Dt] [datetime] NOT NULL , > [Par_val] [float] NOT NULL , > [Rate] [float] NOT NULL , > [Rate_nis] [float] NOT NULL > ) ON [PRIMARY] > GO > > ALTER TABLE [dbo].[Common_rates] WITH NOCHECK ADD > CONSTRAINT [PK_Common_rates] PRIMARY KEY CLUSTERED > ( > [Bank_sec_code], > [Dt] > ) ON [PRIMARY] > GO > > > Any ideas?
- Next message: Val Mazur: "Re: Very strange problem!"
- Previous message: Cindy Winegarden: "Re: FoxPro ... ODBC ... Help !!"
- In reply to: Uri Dor: "SqlDataAdapter.Fill throws me an IndexOutOfRangeException"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|