DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 14 May 2007 18:35:30 -0500,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Beemer Biker


is there a "last id" mechanism on an update?   
I have a gridview "new" command that insert a new row into a postgresql 
database.that uses the odbc driver.

Newbie as I am i thought that iReturn would have the new index that was 
created.

SqlDS1.InsertCommand = "INSERT INTO \"Algorithms\" (source_code_id,  comment 
VALUES (69, 'haleys comet', 1)";

int iResult = SqlDS_Algorithms.Insert();

Ok, instead of getting back an id I got back a "1" which just indicates the 
command ran ok.  Looking at the database I see the new id value and it is 
318.  Is there some mechanism I can use to obtain the index value that was 
autogenerated?

googleing around I see where some people are writing stored procedures and I 
see one here:

http://www.thescripts.com/forum/thread173510.html



Was just wondering if the is a way to use the gridview or sqldataset1 
control to get that index value and avoid writing a stored procedure.



...thanks..


-- 
======================================================================
Joseph "Beemer  Biker" Stateson
http://ResearchRiders.org     Ask about my 99'R1100RT
======================================================================
Date:Mon, 14 May 2007 18:35:30 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us