0

I use sql server 2014.

I have a table in my ManuDB database called (waqf).

I am trying to update the table but not allowed and a message (invalid object name waqf) appears.

I don't know what is the reason although I have a table called waqf.

image

2
  • 3
    Your query currently is in the master database (see the dropdown just above the Object Explorer) - and there's no table of that name in the master database! Commented May 2, 2014 at 15:32
  • Oh =) ok done thanks alot ~~ still a beginner Commented May 2, 2014 at 15:33

3 Answers 3

3

Because you are executing the statement in Master Database as shown in the snip shot.

enter image description here

select the correct database from drop down list shown in picture or execute the following statement.

USE ManuDB 
GO

UPDATE ......
Sign up to request clarification or add additional context in comments.

5 Comments

You'er welcome :) and dont worry its not only the new ones who make this mistake, people working with sql server for years still make this mistake but we know how to fix it.
ok can I ask a question ~~ I conected my dB with a website using visuall studio but I have a problem can I ask ?
Yes sure go ahead if I can help I will
ok In my my waqf table I have a column for images I only inseted the image link E.g w_img=N'Images/1.jpg' in the website I connected evry thing but when I run the website all the table appears except the image I dont know why the picture show the website and the image should appear inthe left majaless.com/up/get-5-2014-8payeas0.jpg
1

From the drop down list of database; set it to ManuDB.

At the moment, it's pointing to Master which doesn't have your table.

Comments

1

Type USE <yourdatabasename> before your update statement

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.