Databases :: SQL Compatibility issues :: SQL Querys in Asp |
|||
| By: digitaltree |
Date: 05/09/2003 00:00:00 |
Points: 25 | Status: Answered Quality : Excellent |
|
I am working on a asp website at the moment and having moved over all the code and the database to my local copy i have found that I have to put certian prefixs in front of them for eg the database owner login is called nt593 so if i want to select from a table my query is written like so SELECT * FROM nt593.users However there are other tables that will not accept that extention and need to be prefixed for EG dbo.users. Why is this ? |
|||
| By: KenAdney | Date: 05/09/2003 02:24:00 | Type : Comment |
|
| It depends on who owns the table. If this is a MS SQL Server db, you can use the Enterprise Manager to see who owns which tables. |
|||
| By: joeposter649 | Date: 05/09/2003 03:30:00 | Type : Comment |
|
| What database? Are you sure you have the same alias's set up in your local db? Are you sure you have the same userid in your connection string? |
|||
| By: VGR | Date: 06/09/2003 18:57:00 | Type : Answer |
|
| because the tables belong to different databases (and/or namespaces, as SQL defines them). This is really DB-provider-dependent, but it probably means you forgot to setup the local copy as the main one is, ie some configuration file will contain a set of links to the prefixes (or a default database to use) If the original configuration file(s) are unavailable, then try to set up the database to use via a query "USE database;" before you access any non-qualified table names |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








