Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7586949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:33:11+00:00 2026-05-30T19:33:11+00:00

I did spend an hour searching before I posted about this problem. The table

  • 0

I did spend an hour searching before I posted about this problem.

The table does exist and I can query that table and I can see the resultset but when i try to execute from Visual Studio 2008 I get the below error:

Cannot find the object "Products" because it does not exist or you do not have permissions

Why does this error occur and what should I do to resolve it?

using (System.Data.SqlClient.SqlCommand cmd = connection.CreateCommand() as System.Data.SqlClient.SqlCommand)
{
   cmd.CommandText = "SET IDENTITY_INSERT Products ON";
   cmd.CommandType = CommandType.Text;
   cmd.ExecuteNonQuery();
}

I tried specifying dbo.Products and before executing I also tried use dbname but that did not help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:33:13+00:00Added an answer on May 30, 2026 at 7:33 pm

    after spent few hours and lost few hairs i found that the problem was in the connection strings (but this is still did not convence me) and as i said in question i was not having any issues but suddenly its pop-up and i havent change anything (who knows what dba have changed)

    so I try tweak my connection string instead, and it does make a string
    to see if it makes a difference: and it does.

    c.Provider = 'sqloledb'
    dsn = 'Server=MyServer;Database=MyDB;Trusted_Connection= Yes'
    c.Open(dsn)
    

    the only thing i have added to my connection string is Trusted_Connection= Yes

    PS: SET IDENTITY_INSERT remains on for your session until
    you turn it off, and it can only be on for one table at a time

    Hope this will help others…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I spent about hour and did not find any clue how to highlight my
So I have a little Linux problem, geez that will teach me to spend
Before I go off and spend several hours building this, I wanted to see
Did you ever use Oracle auditing features on a production db? How did that
I had an update like this: update table set col1=?,col2=?,col3=? where col4=?; and I
I've got a problem and hope you can help me find a solution. Name
I asked this question yesterday about storing a plot within an object. I tried
One hour ago, I spend a lot of time and finished the project but
Well this is incredibly frustrating. After being nagged by Rails that I need to
I'm using Closure Compiler , when compiling my scripts I spend the following: Before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.