Results 1 to 3 of 3

Thread: Retrieving Data From A Different Database

  1. #1

    Thread Starter
    Hyperactive Member rplcmint's Avatar
    Join Date
    Jan 2001
    Location
    Stockton, CA
    Posts
    333

    Retrieving Data From A Different Database

    Right now I'm running a stored procedure on my Premium Database....I need to retrieve a single record from a different database on the Address Database (same machine).

    Is there a way that I can retrieve this data in the SP to hit this 'remote' database. Is there a easy procedure to make a call and retrieve data and continue with my SP. It can be a cursor..I know how to do that.

    The other option is let develop my VB code to connect to the second database and make the retrieval.

    Whatcha think?

  2. #2
    Fanatic Member vb_dba's Avatar
    Join Date
    Jun 2001
    Location
    Somewhere aloft between the real world and insanity
    Posts
    1,016
    If your using SQL Server, you can query the other database like this:
    Code:
    Select *
    From [dbname].dbo.myTable
    Where dbname is the name of the database you are looking at and myTable is the name of the table you are quering w/in that database.
    Chris

    Master Of My Domain
    Got A Question? Look Here First

  3. #3

    Thread Starter
    Hyperactive Member rplcmint's Avatar
    Join Date
    Jan 2001
    Location
    Stockton, CA
    Posts
    333
    That was easy enough!

    Thanks for the tip!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width