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 6124643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:09:22+00:00 2026-05-23T16:09:22+00:00

When doing… select * from students I get a Invalid object name error. Basically,

  • 0

When doing…

select * from students

I get a “Invalid object name” error. Basically, I think I can see the problem in that the tables are prefixed with an object name rather than just dbo, lets call the schema “test”.

So this means….

select * from test.students

The problem I have is that I can’t change the SQL code (it’s in release, long story) or change the tables. My question is, is there anything I can change in SQL server that will allow me to connect say with a specific SQL server user so I can still run my queries as…

select * from students

Omitting the object name, but still have the object name against the table? I can add another SQL user or something like that no problem.

I’m using Java over the jdbc protocol, so my connection string is something like jdbc:sqlserver://hostname:port;databaseName=db;user=myuser;password=mypassword

Thanks,

David

  • 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-23T16:09:23+00:00Added an answer on May 23, 2026 at 4:09 pm

    You’re looking for a default schema option, which doesn’t exist for a given connection. That is to say that you can’t say something like “until I say otherwise, unqualified tables are in the test schema”. You can, however, set a default schema for a user. For your example, you’d do

    alter user [myuser] with default_schema = [test]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing an expression I get an error, can someone show me the correct syntax
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
Doing a Socket.Receive(byte[]) will get the bytes in from the buffer, but if the
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing some 3D stuff in wpf- want to use a simpler test to see
Doing a some practice questions for exam tomorrow can't figure out this one What
Doing my first MVVM WPF application. I expected to see a Main() method in
Doing this in a console program: object x = new string(new char[0]); If one
I am currently running into a problem where an element is coming back from
Doing a file upload to an aspx page from C#. Getting a: PathTooLongException The

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.