Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2004, 07:04 AM
toroka toroka is offline
Junior Member
 
Join Date: Aug 2004
Posts: 4
Default odbc - mysql : always ask for password the TTable..

Hi!

I installed odbc on my winxp, and i use an old P1 as Linux/MySQL server. I can acces to my tables if i give the TTable Database Name and Table Name. But in my application, when i open table, always ask for password. Can i give somewhere the sql account and password permanently?

Andras
Reply With Quote
  #2  
Old 10-22-2004, 07:41 AM
Rob-Z Rob-Z is offline
Senior Member
 
Join Date: Jul 2003
Posts: 134
Default RE: odbc - mysql : always ask for password the TTable..

If you are using BDE, create a TDatabase component, set the ODBC database, then the LoginPrompt to FALSE, set the params property with the right userid and password. Then add your TTable and set it to the TDatabase connection instead of your default ODBC connection. If you use ADO, its basically the same.

PLEASE CLICK ACCEPT AS ANSWER IF HELPFUL

Rob
Reply With Quote
  #3  
Old 10-22-2004, 07:47 AM
Rob-Z Rob-Z is offline
Senior Member
 
Join Date: Jul 2003
Posts: 134
Default RE: odbc - mysql : always ask for password the TTable..

Just in case I missed a step:

1. Drop TDatabase
2. Set AliasName to your ODBC connection
3. Give it a DatabaseName value example: MYDATABASE
4. Set LoginPrompt to FALSE
5. Set Params to have a key USER NAME with value: your userid, and a key PASSWORD with the password value
6. Drop a TTable component
7. Set the TTable DatabaseName to MYDATABASE
8. Select the table you wish to access under tablename property.

PLEASE CLICK ACCEPT IF HELPFUL

Rob
Reply With Quote
  #4  
Old 10-22-2004, 08:36 AM
chipotle chipotle is offline
Senior Member
 
Join Date: Aug 2004
Posts: 231
Default RE: odbc - mysql : always ask for password the TTable..

missed one more thing

Set Connected = True for the database component

Hope this helps
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:11 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.