.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 24th, 2003, 07:25 PM
joephoenix joephoenix is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 26 joephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Deleting rows

When you bring in SQL records onto an .aspx page, is it possible to delete a row off the page (using VB) without deleting the record itself from the SQL table? <img border="0" src="/forum/emoticons/confused.gif" height="22" width="15" alt="confused" />

Reply With Quote
  #2  
Old April 25th, 2003, 02:24 AM
MIB MIB is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 6 MIB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes. The dataset is disconnected record. If u delete the record from dataset then it's temporarily deleted. It wont effect your database record. <br><br>Unless u commit to database, such as using Sqlcommand or use SqlCommandBuilder<br>I am not a VB programmer, so I will show you the C# does.<br><br>1. use sqlcommand<br>SqlConnection con;<br>SqlCommand cmd;<br>string DeleteSQL;<br>DeleteSQL = "DELETE authors WHERE au_id = '123';<br>con = new SqlConnection("Server=localhost;Database=pubs;uid=xxx;pwd=xxx");<br>cmd = new SqlCommand(DeleteSQL, con);<br>con.Open();<br>cmd.ExecuteNonQuery();<br><br>2. SqlCommandBuilder<br>SqlCommandBuilder objCB= New SqlClient.SqlCommandBuilder(yourSQLDataAdapter)<br>yourSQLDataAdapter.Update(yourDataSet)<br><br>Hope this help

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Deleting rows


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT