How to get the result of the database function before connecting to the database .

You can find out which databases the user has access to with
HAS_DBACCESS():

select name
from master..sysdatabases
where has_dbaccess(name) = 1
order by name

So when the user selects a site, the front end should check
the result of the HAS_DBACCESS() function for each database
- if it's 1, then it can be selected; if not, it can't.
Please reply asap
Thanks
0
jm
6/8/2004 6:41:26 PM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

2 Replies
703 Views

Similar Articles

[PageSpeed] 44

How about a special user ID that has only enough authority to check a name?
Sign on with it, ask if the user is OK, sign off, sign on with the real
user.

<jm> wrote in message news:40c608ad.25cd.1681692777@sybase.com...
> You can find out which databases the user has access to with
> HAS_DBACCESS():
>
> select name
> from master..sysdatabases
> where has_dbaccess(name) = 1
> order by name
>
> So when the user selects a site, the front end should check
> the result of the HAS_DBACCESS() function for each database
> - if it's 1, then it can be selected; if not, it can't.
> Please reply asap
> Thanks


0
Jerry
6/8/2004 7:06:44 PM
The Master database is granted to public
So you can connect using:

SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "master"
SQLCA.ServerName = "servername"
SQLCA.LogPass = "their password"
SQLCA.LogId = "their ID"


Create a datawindow that gets the databases
they have access to.  dbid > 5 will omit
the master, pubs... databases

SELECT name FROM master.dbo.sysdatabases
where has_dbaccess(name) = 1
and dbid > 5
ORDER BY name


If you just want them to input the database
this will return 1 if the name is found:

SELECT HAS_DBACCESS('databasename')


> You can find out which databases the user has access to
> with HAS_DBACCESS():
>
> select name
> from master..sysdatabases
> where has_dbaccess(name) = 1
> order by name
>
> So when the user selects a site, the front end should
> check the result of the HAS_DBACCESS() function for each
> database - if it's 1, then it can be selected; if not, it
> can't. Please reply asap
> Thanks
0
Dawn
6/8/2004 11:56:22 PM
Reply:

Similar Artilces:

Database Connection???How to connect a Database in an other server?
How to connect a Database(.mdb) in an other server? Can I use the connection string like below? mycon.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=http://www.****.com/***/mydb.mdb" You can not. That simple. Access is file based. No a client/server architecture.Thomas TomiczekPowerNodes ApS(Microsoft MVP C#/.NET)---Building a Website? Try the PowerNodes CMS - http://www.powernodes.com/ Correction: you can. Just make sure you can reach the acces db file - through a file share that is bound as drive. Not that you should. Performance will be horrib...

How to create a single Oracle Database connection method or function to be used on or by all classes and pages that want to connect to the database?
 How to create a single Oracle Database connection method or function  to be used on or by all classes and pages that want to connect to the database? How can I create one method or function in csharp to be used on all pages or classes when conenction to the database? Please give an example.I have database connections which I am using on each and very page or classes, but I can I put in one page then I just start  calling it?Database connection I am using:   OracleConnection dbconnection;    this.dbconnection = new System.Data.OracleClient.OracleConnec...

Merging database results into other database results dynamically.
Hi, I am having problem coming up with a solution to a operation i want to perform in asp.net. Basically I have a application I am building which uses item data stored in a database and places that data a html template also stored in the database. The user logs in and creates an item in the database with Title, Description, dimensions, picture etc. Once they have created an item the can then select a html template (with the layout, look and feel they want), also stored in another table in the database with their user id, to create a web page (like a brochure). The item information needs t...

getting a database connection in asp.net with a firebird/interbase Database
hello. is there some one wo can help me. i am using a firebird/interbase database. and now ik would like to now. what is the code for connecting to that database. i have this code. but i think it's not good. any one wo can help me.!? after opening the page i get the error :: Compiler Error Message: BC30002: Type 'Firebird.fbConnection' is not defined. <%@ Import Namespace="System.data" %> <%@ Import Namespace="FirebirdSql.Data.firebird" %> <script Language="VB" runat="server"> sub Page_Load(obj as object,...

Database tables disappearing when a function is executed twice within one connection to database.
Using Sybase SQL Anywhere 8.0 When the function is run and the connection is terminated and the procedure is rerun, the database retains the changes without error. If the function is run twice without disconnecting we get a -141 error table dkc not found. Any ideas why it would work as many times as necessary as long is the database is disconnected between attempts and errors on the second run if the database connection has not been reset? Here is a scaled down view of the function , only difference is that the full function follows the same path with 12 additional tables. c...

which database does the database refer in "Not connected to a database" of the second paragraph
I. 01/01 02:30:40. Synchronization Started I. 01/01 02:30:40. Adaptive Server Anywhere MobiLink Synchronization Version 8.0.2.4258 I. 01/01 02:30:40. I. 01/01 02:30:40. Copyright _ 1989-2002 Sybase, Inc. Portions Copyright _ 2002, iAnywhere Solutions, Inc. I. 01/01 02:30:40. All rights reserved. All unpublished rights reserved. I. 01/01 02:30:40. I. 01/01 02:30:40. This software contains confidential and trade secret information of I. 01/01 02:30:40. iAnywhere Solutions, Inc. Use, duplication or disclosure of the software and documentation I. ...

How can I change my connection to a different database...it is not connecting to the database I created.
My data is connected to the ASPNETDB.MDF database. Is this a must that I have it connected to this database or can I have it connected to a database that I created. You can connect to different database such as sql or other access files. All you have to do is to define which connection string to use within your web.config file. If you want to make sure that your database is prepared to be used, use features such as ASPNET_REGSQL.EXE at VS Command Prompt. Hope this helps. Jae.jae.lee@jaeleeandco.com I'm in the Army...here in Georgia. Is it cold there.. Hi Jae,    &nb...

Membership Database connected with custom Database
Hi My Database has many tables related/connected to my PersonalData (professional experience, publications, degrees, certifications, etc) using a foreign key. Used the aspnet_regsql.exe tool to add the Membership's tables to my custom DB. What I want to know is how to connect the User's table and the PersonalData's table to use info from the other tables mentioned above when the user is logged in! A bit urgent!Thanks in advanceAndré da Silva Carrilhohttp://andrecarrilho.blogspot.com/http://dotnetslackers.com/community/blogs/andrecarrilho/If the post has been answered please marke...

how to connect a database server with two databases
Hi, I start a database server (dbsrv6) with two databases(e.g. A and B), but I found that I only connect and query of database A, not B by JDBC . Can ASA support that ???? Thanks Yes, you can connect to any one of the database loaded on a server. Example, if I start the server using dbsrv6 -n myServer A.db B.db C.db Then I can specify which database I want to connect to by using the DBN (databasename) connection parameter, as in dbisql -c "UID=DBA;PWD=SQL;eng=myServer;dbn=A" will connect to the A.db database, where as dbisql -c "UID=DBA;PWD=SQL;e...

database file vs. database connection
Hi...I'm trying to build a web database application. What are the advantages/disadvantages when using a mdf file directly from the app_data folder instead of using a database connection.what is best pracise?  greetingsignorator  The MDF is a SQLExpress database so it is a server based database management system unlike a MDB which is an Access file based database.So using the MDF in your app_data folder is the same as using and connecting to a SQL Server 2000/2005 database.  ...

Add Database Connection to Online Database
When I try to add a database connection to an online database I get the error in the attached photo.All the settings are exactly as provided by my web host, Netfirms.I created the online database through my Netfirms control panel.Any ideas?  Is it possible to make a connection with an online database to use with a SQLDataSource object in this way?    You have to deploy your site to that server to be able to access your database. No way you can do that from your desktop. For testing purposes just create a database in your computer that has the same structure and test wit...

powerbuilder database connections
When I connect to any database using Powerbuilder 4.0 I get the following error messages: unable to start, server not found Could not load interface for specified database unable to load Powersoft ODBC DLL Please help Stephane Stephane, The system can't find PBODB040.DLL. HTH, Carson ---------------------------------------------------------------------------- Carson Hager Dynamic Data Solutions Team Powersoft http://www.dyn-data.com chager@dyn-data.com ******** Are You Ready for the Web ******** ...

powerbuilder database connections
I receive this error message when I try to connect the dbclient. "unable to start, server not found" When I try to connect to any type of database in Powerbuilder, I receive these errors: unable to load Powersoft ODBC DLL could not load interface for specified database Please help Stephane In article <TcVR68XL9GA.205@forums.powersoft.com>, viaust@rmoc.ca says... >> When I try to connect to any type of database in Powerbuilder, I receive >> these errors: >> unable to load Powersoft ODBC DLL >> could not load interface for specified ...

connecting to database from powerbuilder
Hello, Is there any way to connect to database from powerbuilder other than transaction objects.. Thanks in advance Suby a powerbuilder application needs transaction objects to interact with any dbms. what functionality are you trying to build? sanjiv. <Suby> wrote in message news:42d4b61b.3c60.1681692777@sybase.com... > Hello, > Is there any way to connect to database from powerbuilder > other than transaction objects.. > Thanks in advance > Suby Hi The transaction object is the object to be used to connect to any database? What do you...

Web resources about - How to get the result of the database function before connecting to the database . - sybase.powerbuilder.general

List of Nebraska Connecting Link, Spur, and Recreation Highways - Wikipedia, the free encyclopedia
Nebraska Connecting Link , Nebraska Spur , and Nebraska Recreation Road highways are a secondary part of the Nebraska highway system . They connect ...

Israeli Hotel U Coral Beach Club Eilat Has a Unique Way of Connecting Guests to Facebook
U Coral Beach Club Eilat, a hotel in Israel , is taking sharing vacation photos and checking in to the next level thanks to a collaboration between ...

Digital Media Wire - connecting people & knowledge —
dmwnews : Anomaly, the ambitious graphic novel by Brittenham and Haberlin, features augmented reality. http://bit.ly/Iwrxjr Already optioned ...

Connecting 100 Million People in Africa
„Facebook for Business“ liefert dir aktuelle Nachrichten, Tipps und Best Practices für den Einsatz von Facebook zur Erreichung deiner Unternehmensziele: ...

What stops users from connecting with an app through Facebook?
... This equals 850 million users who connect with apps using Facebook at a 59 percent conversion rate. About 590 million users back out of connecting ...

Home - WHLT 22 Connecting the Pine Belt Fan
Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep up ...

US IT Staffing Recruiters Group - Connecting Ideas !
US IT Recruiter's Groups: IT Technical Recruitment. Its all about connecting to new Ideas !

Jewel Dots Puzzler - A Cool Connecting Dots Puzzle For Kids on the App Store on iTunes
Get Jewel Dots Puzzler - A Cool Connecting Dots Puzzle For Kids on the App Store. See screenshots and ratings, and read customer reviews.

Connecting the community, my Twitter strategy, and American Airlines at DFW - Flickr - Photo Sharing ...
I thought, to commemorate this entry on connecting people, that I'd include a photo of an airplane from one of the busiest airports in the world ...

Connecting to Community Graduation YouTube 1080p - YouTube
(Sioux Falls, S.D.) Forty-six seniors have graduated from trying to find the power button to now being avid e-mail, Facebook, Pinterest and Tumblr ...

Resources last updated: 11/26/2015 10:53:30 PM