We help IT Professionals succeed at work.

Delphi and Sybase

triphen
triphen asked
on
When connecting to a MySQL using php, you use somehting like this:


$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');


what would you use to connect Delphi to SyBase?


Comment
Watch Question

Consulting SW Engineer - Lync/Skype4Business
Commented:
This should provide you with all the answers you need concerning Delphi and Database connections:


http://mc-computing.com/databases/Delphi/Database_Connections.html

Author

Commented:
Thank you, in the article it says "Hardcoding userID's and passwords is considered to be a security problem" where would people usually out this information?
Steven SheeleyConsulting SW Engineer - Lync/Skype4Business
Commented:
You'd "hard-code" it in a configuration file and read that into variables at startup.

Author

Commented:
Would that be in clear text or encrypted?
Steven SheeleyConsulting SW Engineer - Lync/Skype4Business
Commented:
That is your choice.  If you encryt it then you're program will have to read it and decrypt it.
Geert GOracle dba
Top Expert 2009
Commented:
you can also find good tutorials on
http://delphi.about.com/od/database/u/delphi_database_programming.htm#s1

it doesn't really matter what you use in delphi
it basically comes down to
1: connection component (and the capability for that database)
2: connection string
3: query component

a very fast component for some databases:
http://www.devart.com/dac.html