473,382 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Retrieving password

I have a small application in ms access that needs to connect to sql server database for certain data and process that information. Is there a way to retrieve the lan password of a specific user id to be able to connect to the sql server database using that user id and password. Thank you for your help in advance.
Jan 24 '08 #1
3 1646
Jim Doherty
897 Expert 512MB
I have a small application in ms access that needs to connect to sql server database for certain data and process that information. Is there a way to retrieve the lan password of a specific user id to be able to connect to the sql server database using that user id and password. Thank you for your help in advance.

Why not simply use windows integrated security to connect to SQL server if you are on a LAN?

Jim
Jan 24 '08 #2
Why not simply use windows integrated security to connect to SQL server if you are on a LAN?

Jim
Thank you Jim for the reply. I am not sure how to do that. How can I do it through VBA. Is it a specific option while establishing the connection?
Jan 24 '08 #3
Jim Doherty
897 Expert 512MB
Thank you Jim for the reply. I am not sure how to do that. How can I do it through VBA. Is it a specific option while establishing the connection?
Hi weluru,

Using an mdb file for interacting with SQL Server relies on what is termed a 'connection string' it is essentially a combination of several elements using ODBC. (ODBC you will see in control panel...administrative tools...data sources. If you have a look at that you will see or should see the option to create file or system DSN,s as they are called that establish a connection to SQL Server using an ODBC driver.)

You can 'hook' into an SQL server database and retrieve datasets using what is called 'passthrough' queries (which end up looking like tables in Access represented by an icon of the 'world' globe.) The tables are never actually in Access they are merely 'linked' to access by the Access program in order for you to see those tables.

Now you may simply wish to process data ON THE SERVER directly itself WITHOUT retrieving datasets as well. Lets imagine you simply wish to empty out a specific table or update a particular column of a database table without ever returning the table to access itself. YOu do this by using TRANSACT SQL language (SQL servers own language speak directly within the SQL window in Access. Confusing isnt it SQL as used by access then VBA and now transact SQL all in the one microsoft access package hmmm :))

To ATTACH tables to Access from SQL Server You visually do this this by using the menubar command in the database window File...Get external data...then in files of type select ODBC databases at which point you will be faced with a series of dialog boxes inviting you to select the appropriate ODBC connection driver. You will see wizardry where you get prompted with options to connect in one of two ways

1) Windows integrated security
OR
2) SQL servers user and password

The difference between these two are basically these:

1) The computer (ie the client desktop machine) knows already who is logged on, so provided that username exists as a user on the SQL server as well with appropriate permissions to access databases and read or write to objects on the server then a password will not be required because the login name for the 'network' will be sufficient to authenticate against the server. The user has to exist as a user ALSO on the SQL server remember? so you have to create the user in SQL server itself AS WELL in order for this to work.

It makes sense doesnt it because no one else is supposed to know anyone elses password if you understand me on that point of the last paragraph.

2) A loginname and password is supplied independantly from any network login and this username and password is used to grant access in much the same way but in an 'application role' that is to say that here we are NOT relying on a network login JUST a straight command to SQL server to 'let me in because I WILL TELL YOU who I am' so to speak.

In both cases the user MUST exist as a user ALSO on the SQL server

Your question was "How do you connect and grab a password" the simple answer is YOU DON'T grab anyones password! (in short you should have NO NEED to know the password yourself if using windows integrated security) The next part of your question was "in order to process information"

If this processing of information is to... shall we say ...truncate (delete from) a table on the server then your wish would be to merely connect too authenticate your credentials against the sql server and then do the relevant process from the Microsoft Access side but from VBA.

You are not limited to only one process here you can do many many different types of data handlng processes ON THE server but from within access. Examples of this might also include creating tables permanent or temporary ,amending tables, indexing tables, throwing data around from one table to another pretty much anything you want to do as though you were WORKING actually in SQL servers itself.

I have contributed already to a similar question on this connectivity and how it can be done in another thread in which you will have the benefit of seeing ADezii's contribution and guidance on a similar method using the ADODB command object. So remember this... you are not limited to only one way of doing things here!! both methods are very extensive. Some have a greater degree of syntax and some have less, but in each case they can to all intents and purposes be designed to do the same thing..... it depends very much on which methods you are comfortable with, where you perceive any overhead in your particular case and ultimately as always which methods you ideally prefer.

In short have a look at that thread and have a go at implementing the methods shown. If you look at the QUERYDEF method you will see the .CONNECT property which is basically YOU telling a query in code 'on the fly' how to connect to SQL server. You will see the necessary constituent parts of the all important connection string required in order to make a successful connection.

I'm sure you will get the picture once you have a look at the thread which concerns creating a query, establishing a connection and doing a process 'all on the fly' have a go at implementing it and I wish you every success with that.

It is all advanced stuff in Access and not for the faint of heart when learning the Access program itself, but if you have difficulties get back to me.

http://www.thescripts.com/forum/thread762313.html

Hope this helps you

Regards

Jim :)
Jan 26 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
6
by: Ian Williamson | last post by:
Greetings, My company has an ASP.NET based enterprise product that is undergoing some changes and I need some community input to help solve a problem. In the current implementation, any given...
6
by: Stu Lock | last post by:
Hi, I have a stored procedure: --/ snip /-- CREATE PROCEDURE sp_AddEditUsers ( @Users_ID int, @UserName nvarchar(80), @Password nvarchar(80),
5
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the...
3
parshupooja
by: parshupooja | last post by:
Hi, I have created a Login Page with Forget Password link. When anyone clicks on Forget password link, they should enter their Username. I want to send a email to that user's email address, which...
1
by: manonbar | last post by:
I have the following URL I use to retrieve whether or not a username and password are successful. You can try the path to see what I get. I am trying to receive all the information from that URL and...
4
mehj123
by: mehj123 | last post by:
Hi... I have written some cgi scripts and I need to pass the user id and password between them.. There is a Login page which passes the user name and password to another cgi script through the url...
2
by: shivapadma | last post by:
i have inserted the image into database using the following code String driverName = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/"; String dbName =...
1
by: fidgen | last post by:
Hiya, I'm trying to get a AJAX driven update to my list of news articles, so when users click the title of the news article, it pops up the article content in a thickbox overlay. Retrieving...
2
by: fishnfrogs | last post by:
Hello everyone! I have an app that uses a for loop to go through an array and it selects all the values from my MySQL database and returns the values. I can't imagine that this is the best...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.