.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Reorder Auto increment

Posted By: nalina     Posted Date: November 07, 2012    Points:5   Category :VB.Net
How to reorder the auto increment id when add or delete row from sql database in vb.net

Responses
Author: Narayanan             
Posted Date: November 07, 2012     Points: 20   

Hi nalina,
Could you please upload your code and Table structure? and explain your question with Example.




Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: nalina             
Posted Date: November 08, 2012     Points: 20   

Hi Sir,

I have table with 4 columns like sno, name, address, phoneno. I specify sno in auto increment. I have 4 data means like
Example

sno name address phoneno
1 aaa sdkfks 123
2 bbb dsfa 2354
3 ccc dfds 246
4 ddd rfwef 678

If i delete 3 row. I want to display in datagridview like

sno name address phoneno
1 aaa sdkfks 123
2 bbb dsfa 2354
3 ddd rfwef 678

pls help me sir.

Regards,
Nalina




Author: nalina             
Posted Date: November 08, 2012     Points: 20   

Thank u sir

Author: Narayanan             
Posted Date: November 10, 2012     Points: 20   

HI,

try this way,
   Select name,address,phoneno from <table_name> order by sno


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend