473,379 Members | 1,187 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,379 software developers and data experts.

Pass Through Query with Custom Login Form

Seth Schrock
2,965 Expert 2GB
I've created a pass through query, but I don't want the credentials saved in the connection string. So when I run it, it asks for a password. Is there a way to pass it the credentials from a custom login screen instead of the ugly Microsoft screen that comes up? I guess I could change the connection string at run-time using code, but that seems clunky. I'm hoping for a query.execute, UID="", PWD="" type option, but I can't find anything in a google search.
Feb 28 '20 #1
7 3531
twinnyfo
3,653 Expert Mod 2GB
Seth,

From what I understand, you "should" be able to have a user login/password form and then generate the Connection String from there. This prevents you from saving passwords and all that security stuff that MS Access isn't good at. it should look something like this:

Expand|Select|Wrap|Line Numbers
  1. qdf.Connent = "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=abcdef;PWD=12345678;SERVER=serverabc123;"
This is a bit outside my wheelhouse, but this may get you started in creating that string.....
Feb 28 '20 #2
Seth Schrock
2,965 Expert 2GB
Well, I was hoping for a different way, but I'll probably just have to go that route.
Feb 28 '20 #3
NeoPa
32,556 Expert Mod 16PB
I assume Windows (AD or AAD) security is unavailable. I always prefer to use that where it's available.
Apr 25 '20 #4
Seth Schrock
2,965 Expert 2GB
You are correct in your assumption. I too prefer AD, but in this case I'm connecting to a program that has its own user database.
Apr 27 '20 #5
NeoPa
32,556 Expert Mod 16PB
Hi Seth.
I believe that if you make a Connection to the server first, then run the query when that Connection has been established, it should use the existing credentials without re-prompting when the query is run. Close the Connection object when done of course ;-)
Apr 28 '20 #6
Seth Schrock
2,965 Expert 2GB
Hmmm. That just might work. I have noticed that once I run the query, it doesn't ask me for a password for any of my queries for a long time. And it would be easy to build a "login" form that simply opens a connection using the provided credentials, allowing the queries to then run without the password prompt. I wonder if manually closing the connection would make the queries prompt for a password again. Definitely something to work on.

Thanks NeoPa!
Apr 28 '20 #7
NeoPa
32,556 Expert Mod 16PB
Seth Schrok:
I wonder if manually closing the connection would make the queries prompt for a password again.
Yes. Always assuming nothing else is keeping the connection open - such as a query or linked table that's using the Connection.
Apr 28 '20 #8

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

Similar topics

1
by: Tim Nelson | last post by:
I am building a data bound application for SQL server which all the forms I use sqlconnections generated by VS. I want to have a login form that changes the connection depending upon login...
5
by: JPSutor | last post by:
I have a login form, that if successfully answered, launches another form. The problem is that the login form remains even after I show the main form. How do I get rid of the login form?
4
by: David Krussow | last post by:
Just wondering if/how it would be possible to display a variable string on the login form - where the string varies depending on the form the user attempted to access. To clarify, an...
7
by: Nerrad | last post by:
Hi, i am currently working on a project which requires me to create a form to allow the user to change their password. I know there is a user-level security login which is easier and safer but...
7
by: Parasyke | last post by:
Can anyone coach me in a custom log-in screen? I have a table set up with users and a password. So basically the user sign in form would authenticate the user and password (IF - Then). What I need...
6
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, We have a requirement where we have to develop a custom Login Page which will accept user's NT credentials ( Username , password, domain name). This then needs to be passed to a website...
0
by: asnowfall | last post by:
After logging in, I am not able to redirect to the target url; and this happens only when I connect to the website using "http://machine- name:portname"; but not if I connect using either...
8
by: Harris Kosmidhs | last post by:
Hello, while I'm developing sites for some time I never coded a login form with security in mind. I was wondering what guidelines there are. For my point of view I'm thinking of using md5...
1
by: Altair | last post by:
When using Dream Weaver CS4 to create a login form , i encounter a problem : Everytime i try to connect the database form MySQL , it says error code 405 : Method not allowed . How can i fix this...
1
by: ibsaqi | last post by:
Hello friends i am basically a new in programming language...i got readymade new login script and which i want to use for another form for my website.i.e Form that i want to use in my website...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.