MySQL and FreePascal

Hi, can some one tell me what the parameters are to connect to
a database using libmysql.a?
jcarlos2Asked:
Who is Participating?
 
jcondeConnect With a Mentor Commented:
It's very simple JCarlos2.  All you need to do is the following:

 sock :=  mysql_connect(PMysql(@qmysql),'hostname','username','password');
  if sock=Nil then
    begin
    Writeln (stderr,'Couldn''t connect to MySQL.');
    Writeln (stderr,mysql_error(@qmysql));
    halt(1);
    end;
{Connected!}

where sock is an Integer, pmysql() is a pointer to mysql and mysql is
the structure record.

--jconde
0
 
gravityCommented:
'frais not... but, could you help with my quest for a MySQL area in Experts Exchange by posting a new topic suggestion?

Thanks,
Tom
0
 
jcarlos2Author Commented:
Thanks jconde

--jc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.