MySQL and FreePascal

Posted on 1998-08-18
Last Modified: 2012-06-21
Hi, can some one tell me what the parameters are to connect to
a database using libmysql.a?
Question by:jcarlos2
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

Expert Comment

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


Accepted Solution

jconde earned 200 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
    Writeln (stderr,'Couldn''t connect to MySQL.');
    Writeln (stderr,mysql_error(@qmysql));

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


Author Comment

ID: 1025555
Thanks jconde


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error doing substr 3 37
C# DataTable (in memory) vs SQL Lookups 4 36
error starting form builder in 11g 2 27
Dynamic Table mySQL stored procedure 5 37
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 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