🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #10

"Index 1 is not non-negative and below total rows count"

#10
From: Brigitte Spatz
Date: Wed, 10 Jan 2007 13:49
12 lines
1361 bytes
I use the following common code from about 20 forms to insert a new 
record into an SQL Server 2005 DB. In all but one it works. In one I get 
the above error message in the third line.
     dv.AllowNew := true; //dv = DataView
     bm.AddNew; //bm = BindingManager
     with dv.Item[bm.Position].Row do

Inspecting shows bm.Position to be correct. What could be wrong here?

TIA.

Brigitte
Technical Details
Message-ID: <45a4eee5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,c2e9cd633050f6c5,start
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 10 Jan 2007 14:49:23 +0100
From: Brigitte Spatz <brigitteNOSPAM.spatz@svenmahn.de>
Organization: Sven Mahn IT-Systementwicklungen
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.delphi.database.dotnet
Subject: "Index 1 is not non-negative and below total rows count"
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 0701-0, 03/01/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 89.54.114.12
Message-ID: <45a4eee5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168436965 89.54.114.12 (10 Jan 2007 05:49:25 -0800)
Lines: 12
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail