<div dir="ltr">Wouldn't this...<div><br></div><div>

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">MyConnection.Create(Nil);</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">// MyQuery.Create(Nil);</span>

<br></div><div><br></div><div>... be more like...<div><br></div><div>MyConnection := 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">TZConnection.Create();</span></div><div><span style="font-size:12.8px">MyQuery := TQuery.Create();</span><br></div><div><span style="font-size:12.8px"><br></span></div><div>Then at the end you'd need...</div><div><br></div><div>MyQuery.Free();</div><div>MyConnection.Free();</div><div><br></div><div><span style="font-size:12.8px">Jeff</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 16, 2018 at 10:25 AM, Terry A. Haimann <span dir="ltr"><<a href="mailto:terry@haimann.us" target="_blank">terry@haimann.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am trying to write a command Line Pascal program to connect to a MySQL<br>
database using the ZeosDBO Library. I am sure I have done something<br>
stupid.<br>
<br>
I have it now so that it will compile, but it crashes as soon as I try<br>
to modify my TZConnection variable.<br>
<br>
<br>
I have it defined as:<br>
<br>
        MyConnection:           TZconnection;<br>
<br>
And code is defined as:<br>
<br>
        WriteLn('2');<br>
        MyConnection.Create(Nil);<br>
        // MyQuery.Create(Nil);<br>
        WriteLn('2.0);<br>
        MyConnection := '127.0.0.1';<br>
        WriteLn('2.1');<br>
        MyConnection.Protocol   := 'mysql';<br>
        WriteLn('2.2');<br>
        MyConnection.Database   := 'MyDatabase';<br>
        WriteLn('2.3');<br>
        MyConnection.User       := 'MyUser';<br>
        WriteLn('2.4');<br>
        MyConnection.Password   := 'MyPass';<br>
        WriteLn('2.5');<br>
        MyConnection.Connected := True;<br>
        WriteLn('2.6');<br>
<br>
It never hits 2.0, so I believe it is dying on the create. Am I doing<br>
the create wrong?  I can't find any examples as too doing this, I have<br>
tried googling it.  Most of the examples I see are doing this from<br>
Lazarus.  Not from a command line Free Pascal program.<br>
<br>
Thanks in advance,      Terry H.<br>
<br>
______________________________<wbr>_________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.<wbr>org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/<wbr>cgi-bin/mailman/listinfo/fpc-<wbr>pascal</a></blockquote></div><br></div></div></div>