Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL and FreePascal

Posted on 1998-08-18
3
Medium Priority
?
810 Views
Last Modified: 2012-06-21
Hi, can some one tell me what the parameters are to connect to
a database using libmysql.a?
0
Comment
Question by:jcarlos2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:gravity
ID: 1025553
'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
 
LVL 7

Accepted Solution

by:
jconde earned 800 total points
ID: 1025554
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
 

Author Comment

by:jcarlos2
ID: 1025555
Thanks jconde

--jc
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
What we learned in Webroot's webinar on multi-vector protection.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question