There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
bios black screen blue screen boot computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router slow sound startup trojan usb virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB6 Databound controls


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Royv's Avatar
Junior Member with 7 posts.
 
Join Date: Jul 2003
16-Oct-2003, 04:36 AM #1
Angry VB6 Databound controls
I'm trying to use databound controls to develop a query/update system for a database which has a password. How do I supply the password?
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
16-Oct-2003, 09:34 AM #2
The password is part of the connection string to the database. If you don't want to hard-code it into your program then you'll have to prompt the user for database authentication credentials then set the connection string property of your database connection object dynamically.
Royv's Avatar
Junior Member with 7 posts.
 
Join Date: Jul 2003
17-Oct-2003, 04:42 AM #3
I'm sorry I haven't explained properly. I've coded database applications in other programs using connection strings & supplying my own code to handle everything. Here, I'm trying to use a data control & there's nowhere in the properties box to add a password. I supply the database name but, when I try to type in the record source, it gives me a 'Not a valid password' error. I've tried adding the password to the database name in various ways but all get rejected.
I'm not very well up on the use of databound controls & would appreciate some further help.
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
17-Oct-2003, 08:33 AM #4
Are you using DAO or ADO? If ADO then the password is part of the connection string.
Royv's Avatar
Junior Member with 7 posts.
 
Join Date: Jul 2003
18-Oct-2003, 04:45 AM #5
I'm using DAO.
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
18-Oct-2003, 11:49 AM #6
The only way that I can find to do what you want is the access the database through ODBC. Then you can specify the entire ODBC connection string, including the password, in the connect property of VB's intrinsic data control and leave the DatabaseName property blank.

I recommend, however, using ADO. MS is phasing out support for DAO and moving forward, ADO will allow you to use an alternate database solution without changing your code. With ADO, once the initial connection is made to the database, the access code is written the same way regardless of what the underlying database engine happens to be. In short, with ADO, the developer doesn't need to care what type of database the target is.
Royv's Avatar
Junior Member with 7 posts.
 
Join Date: Jul 2003
19-Oct-2003, 05:21 AM #7
Thanks for your help. I'll start looking into ADO & convert to that before continuing with this project.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:27 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.