Click here to Skip to main content
15,916,835 members
Home / Discussions / Database
   

Database

 
GeneralRe: looping datatable Pin
robmays2-Aug-04 20:56
robmays2-Aug-04 20:56 
GeneralCollation name question... Pin
theJazzyBrain1-Aug-04 6:54
theJazzyBrain1-Aug-04 6:54 
GeneralRe: Collation name question... Pin
Thea Burger2-Aug-04 1:11
Thea Burger2-Aug-04 1:11 
QuestionDetecting overlapping date ranges - best strategy - help? Pin
Paul Evans1-Aug-04 5:38
Paul Evans1-Aug-04 5:38 
Generalhai Pin
Asha Rams31-Jul-04 22:32
Asha Rams31-Jul-04 22:32 
GeneralBTrieve 6.15 Pin
Mega131-Jul-04 18:05
Mega131-Jul-04 18:05 
GeneralRe: BTrieve 6.15 Pin
Mekong River1-Aug-04 4:07
Mekong River1-Aug-04 4:07 
GeneralSynchronizing tables Pin
winpiglet31-Jul-04 10:43
winpiglet31-Jul-04 10:43 
Questionis there any Win32 function help access SQL server? Pin
fu031-Jul-04 1:47
fu031-Jul-04 1:47 
AnswerRe: is there any Win32 function help access SQL server? Pin
Michael P Butler31-Jul-04 22:14
Michael P Butler31-Jul-04 22:14 
GeneralSP - Efficient "Find" method Pin
UB30-Jul-04 21:58
UB30-Jul-04 21:58 
GeneralRe: SP - Efficient "Find" method Pin
Daniel Turini31-Jul-04 11:05
Daniel Turini31-Jul-04 11:05 
GeneralSQL query to generate random numbers Pin
Imtiaz Murtaza29-Jul-04 23:45
Imtiaz Murtaza29-Jul-04 23:45 
GeneralRe: SQL query to generate random numbers Pin
Steven Campbell30-Jul-04 7:55
Steven Campbell30-Jul-04 7:55 
GeneralRe: SQL query to generate random numbers Pin
Grimolfr30-Jul-04 8:22
Grimolfr30-Jul-04 8:22 
GeneralBeginner - OLE DB - bind IRowSet to grid control Pin
poptcat29-Jul-04 21:46
poptcat29-Jul-04 21:46 
GeneralRelation between tables Pin
RoyRose7829-Jul-04 20:17
RoyRose7829-Jul-04 20:17 
GeneralRelation between tables Pin
Sendilkumar.M30-Jul-04 19:13
Sendilkumar.M30-Jul-04 19:13 
GeneralRe: Relation between tables Pin
RoyRose7830-Jul-04 22:15
RoyRose7830-Jul-04 22:15 
GeneralPlease recommend on connection to Ms Acess Database Pin
DotNet29-Jul-04 15:16
DotNet29-Jul-04 15:16 
GeneralRe: Please recommend on connection to Ms Acess Database Pin
EdbertP29-Jul-04 16:52
EdbertP29-Jul-04 16:52 
GeneralUser access to SQL Server database Pin
Colin Angus Mackay29-Jul-04 6:35
Colin Angus Mackay29-Jul-04 6:35 
I'm in the process of writing a stored procedure that copies information from one database to another. One of the pre-copy checks at the start of the stored procedure is to make sure that the logged in user has the right to create the tables and copy the data in the destination database.

How can I tell if the logged in user can access another database?

Also, I don't want it to raise an error while doing this. I currently have the following:
CREATE TABLE #temp (name sysname);
SET @stmt = 'USE ['+@destination_database+']; SELECT name from sysusers WHERE name='''+USER+'''';
INSERT #temp EXEC(@stmt);


My idea was to see if the #temp table contained any records, but obviously if the user has no permission to use the database this isn't going to work.

Any ideas?


"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!


GeneralRe: User access to SQL Server database Pin
Grimolfr29-Jul-04 7:56
Grimolfr29-Jul-04 7:56 
GeneralRe: User access to SQL Server database Pin
Colin Angus Mackay29-Jul-04 22:37
Colin Angus Mackay29-Jul-04 22:37 
QuestionODBC API's code examples? Pin
PrashantJ28-Jul-04 21:54
PrashantJ28-Jul-04 21:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.