I found this site and started to test MyDAC before purchasing. I'm developing tcp/ip server where every connected tcp/ip client will be authenticated by verifying username and password from mysql database from "users" table. I see that the work of MyDAC is based on visual interface like datasources linked with dbgrids etc, but i don't need any visual interfaces. Can you show me an example, which components should be used for such purposes? And our MySQL database uses UTF8 encoding, maybe I should use unicode enabled MyDAC components?
Here is Delphi 2007 used for coding. Thank you.
tcp/ip server and MyDAC
Code: Select all
use MyAcces;
var MyConnection: TMyConnection;
MyQuery : TMyQuery;
begin
try
Myconnection := TMyConnection.Create(nil);
// setup de username, password, database and server
....
MyQuery := TMyQuery.Create(nil);
MYQuery.Connection := MyConnection;
// do your thing
finally
MyQuery.active := false;
MyQuery.free;
MyConnection.free;
end;
end; Re: tcp/ip server and MyDAC
You should use the Unicode build if you use UTF8 characters in SQL queries, table names or field names. But if you use UTF8 characters only in fields values in database tables then you don't need to use the Unicode build.intelworker wrote:And our MySQL database uses UTF8 encoding, maybe I should use unicode enabled MyDAC components?
-
intelworker
- Posts: 2
- Joined: Sun 19 Apr 2009 19:32