i




 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixed delete SQL Server database records ?
04-13-2015, 04:32 AM
Post: #1
Not Solved Fixed delete SQL Server database records ?
I use C # to insert records into SQL Server 2005 after inserted me into the table to delete records but not receive an error message, you see the image attached, you do know what software debugging SQL Server on http://s17.postimg.org/6wjwqdzcf/error_data.jpg


Quote
04-13-2015, 05:19 AM
Post: #2
Not Solved RE: Fixed delete SQL Server database records ?
post the query which you are using to delete the records. Most probably some issue in your query. if you are trying to delete the records manually from database then i suggest to delete it with query.

Code:
delete from users
where TAIKHOAN= 'admin'

[Image: 2604595733.png]
Quote
04-13-2015, 05:27 AM
Post: #3
Not Solved RE: Fixed delete SQL Server database records ?
(04-13-2015 05:19 AM)nisar87 Wrote:  post the query which you are using to delete the records. Most probably some issue in your query. if you are trying to delete the records manually from database then i suggest to delete it with query.

Code:
delete from users
where TAIKHOAN= 'admin'

not deleted, an error (users = 'TABLUONGNV')
Msg 208, Level 16, State 1, Line 1
Invalid object name 'TABLUONGNV'.
Quote
04-13-2015, 06:04 AM
Post: #4
Not Solved RE: Fixed delete SQL Server database records ?
can you please post the complete query, without that how we can know where is the error.

[Image: 2604595733.png]
Quote
04-13-2015, 06:07 AM
Post: #5
Not Solved RE: Fixed delete SQL Server database records ?
(04-13-2015 06:04 AM)nisar87 Wrote:  can you please post the complete query, without that how we can know where is the error.

of course, you see my image
http://s28.postimg.org/a1z8ldgz1/error_data2.jpg
Quote
04-13-2015, 06:13 AM
Post: #6
Not Solved RE: Fixed delete SQL Server database records ?
The query looks fine, the error suggest that query unable to find the table mentioned in the query, if table name is correct the most probably you are querying in wrong database. please make sure, "shopping" database is selected by default in your combobox where "master" is usually selected by default. or you can change the query like this.

Code:
USE [Shopping]
//rest of your query mentioned in image.

[Image: 2604595733.png]
Quote
04-13-2015, 06:52 AM
Post: #7
Not Solved RE: Fixed delete SQL Server database records ?
(04-13-2015 06:13 AM)nisar87 Wrote:  The query looks fine, the error suggest that query unable to find the table mentioned in the query, if table name is correct the most probably you are querying in wrong database. please make sure, "shopping" database is selected by default in your combobox where "master" is usually selected by default. or you can change the query like this.

Code:
USE [Shopping]
//rest of your query mentioned in image.

thank you help me fix success, thank you very much.
Quote


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  how to delete row in gridview but not from database? Dhanashri_Ghadge 1 2,217 11-28-2013 11:19 AM
Last Post: nisar87
  sql server agent problem praveen 4 1,720 08-19-2013 07:46 AM
Last Post: magnum_2007
  Problem with connection to sql server trytaher 2 1,665 08-01-2013 09:45 AM
Last Post: magnum_2007
Rainbow How to delete multiple records from 3 tables in sql server 2005 ? sharath 6 3,548 01-16-2013 04:46 AM
Last Post: praveen
  selecting records in Entity Framework using c# ali_hamza 2 2,353 01-15-2013 01:18 PM
Last Post: magnum_2007



User(s) browsing this thread: 1 Guest(s)