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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:46:07+00:00 2026-06-16T03:46:07+00:00

Okay here it goes . . . I have a web application I am

  • 0

Okay here it goes . . . I have a web application I am developing in Microsoft Visual Web Developer using ASP, VB.net, etc. that will allow “Sellers” to post ads for “Buyers” to view. When the Buyer searches for a product, each result needs to display the Seller’s name, and the product’s information. The problem being that the table that holds the various product information is located in one database and the user/membership information is stored in another database.

I’ll provide an example. In this case the Buyer is searching for all ads for a particular book.

  1. Each ad is recorded in database db_1 and table [Results] with
    columns for ID_USER, and ID_BOOK.
  2. Book information is stored in db_1 [Books] with columns for ID, TITLE, AUTHOR.
  3. User information is stored in a separate database db_2 and table
    [Users] with columns for ID and NAME.

Given that, how would I do something like the following:


SELECT u.Name [Seller]
, b.Title [Title]
, b.Author [Author]
FROM db_1.Results r
INNER JOIN db_1.Books b
ON b.id = r.id_book
INNER JOIN db_2.Users u
ON u.id = r.id_user
WHERE b.Title like 'Some Book Title'

If these tables were in the same database (which I’m now wishing I had done), then I would easily run an inner join or some other select statement to pull only the relevant data. I’ve also considered creating datasets and joining them (e.g., http://www.vb-helper.com/howto_net_dataset_foreign_key.html), but wouldn’t that be way too server-heavy?

I’m half decent with SQL statements, but all my knowledge comes from Google and from practice so if I am ignoring some crucial caveat that every classically trained programmer is aware of, I apologize. Thank you in advance for the help.

UPDATE: I thought I would give an update on the situation. The problem actually did not have anything to do with the permissions. The problem was that VWD could not find the object. I solved this issue by using a CROSS JOIN and explicitly stating the directory path of the .mdf file in the select statement. Thank you again for all your 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-06-16T03:46:09+00:00Added an answer on June 16, 2026 at 3:46 am

    Here are simple steps to use same user in both database and grant select permission using sql server management tool

    • go to db1 > security > users > new user.
    • Click login name and browse name and select user you want to use
    • go to db2 > security > users > new user.
    • Click login name and browse name and select same user from db1 above
    • Go to user table in db2, right click and go to properties click
      permissions and click search button to find same user from above and
      select that user
    • In User or roles box select user and then go to permissions panel
      below and check Grant for select and click ok.

    Repeat last step for all tables you want database user to have access from database 2

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

Sidebar

Related Questions

Okay here is what I'm trying to do: I have a model object that
Okay so here's, the scenario I have a thumbnail that contains an artists profile
Okay so scenario goes like this : I have multiple web applications, which consume
Okay, cannot find anything online about this error, so here goes. Using Access 2003.
Okay here's my issue. I have a block that is 348px wide, and on
Okay guys hopefully I can explain this effectively, so here goes. I have a
Okay this is definitely a n00b question but here goes. The way I understand
Okay, here goes. Stack Overflow virgin here but hopefully you guys will be able
Okay, this is going to be hard to explain but here goes nothing: Lately
Okay here's my situation. I have the following branches development development-kirby (270 commits ahead

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.