Hi all. This is my test program to track interface changes in mysql lib.<br><br>program MySQLku;<br><br>uses<br> mysql50; //Before is mysql4<br><br>const<br> DataBase : Pchar = 'dbtes';<br> Query : Pchar = 'select * from tbl';<br> InsertSQL : PChar = 'insert into tbl (a, b) values (''value a'',"value b")';<br><br>var<br> count,num : longint;<br> code : integer;<br> sock : PMYSQL;<br> qmysql : TMYSQL;<br> qbuf : string [160];<br> rowbuf : TMYSQL_ROW;<br> dummy : string;<br> recbuf : PMYSQL_RES;<br><br>begin<br> if paramcount=1 then<br> begin<br> Dummy:=Paramstr(1)+#0;<br> DataBase:=@Dummy[1];<br> end;<br> Write ('Connecting to MySQL...');<br> mysql_init(PMySQL(@qmysql));<br> sock := mysql_real_connect(PMysql(@qmysql),nil,'root','',nil,0,nil,0);<br> if sock=Nil
then<br> begin<br> Writeln (stderr,'Couldn''t connect to MySQL.');<br> Writeln (stderr,mysql_error(@qmysql));<br> halt(1);<br> end;<br> Writeln ('Done.');<br> Writeln ('Connection data:');<br>{$ifdef Unix}<br> writeln ('Mysql_port : ',mysql_port);<br> writeln ('Mysql_unix_port : ',mysql_unix_port);<br>{$endif}<br> writeln ('Host info : ',mysql_get_host_info(sock));<br> writeln ('Server info : ',mysql_stat(sock));<br> writeln ('Client info : ',mysql_get_client_info);<br> Writeln ('Selecting Database ',DataBase,'...');<br> if mysql_select_db(sock,DataBase) < 0 then<br> begin<br> Writeln (stderr,'Couldn''t select database ',Database);<br> Writeln
(stderr,mysql_error(sock));<br> halt (1);<br> end;<br><br> writeln ('Executing query : ',InsertSQL,'...');<br> if (mysql_query(sock,InsertSQL) < 0) then<br> begin<br> Writeln (stderr,'Query failed ');<br> writeln (stderr,mysql_error(sock));<br> Halt(1);<br> end;<br><br> recbuf := mysql_store_result(sock);<br> if RecBuf=Nil then<br> begin<br> Writeln ('Query returned nil result.');<br> mysql_close(sock);<br> halt (1);<br> end;<br> Writeln ('Number of records returned : ',mysql_num_rows (recbuf));<br> Writeln ('Number of fields per record : ',mysql_num_fields(recbuf));<br><br> rowbuf := mysql_fetch_row(recbuf);<br> while (rowbuf
<>nil) do<br> begin<br> Write ('(Id: ', rowbuf[0]);<br> Write (', Name: ', rowbuf[1]);<br> Writeln(', Email : ', rowbuf[2],')');<br>rowbuf := mysql_fetch_row(recbuf);<br> end;<br> Writeln ('Freeing memory occupied by result set...');<br> mysql_free_result (recbuf);<br> Writeln ('Closing connection with MySQL.');<br> mysql_close(sock);<br> halt(0);<br>end.<br><br> ---------------------------------------------------------------------<br> Compiling MySQLku.pas<br> <br>mysqlku.pas(16,18) Error: Identifier not found "TMYSQL"<br>mysqlku.pas(16,18) Error: Error in type definition<br>mysqlku.pas(18,22) Error: Identifier not found "TMYSQL_ROW"<br>mysqlku.pas(18,22) Error: Error in type definition<br>mysqlku.pas(74,17) Error: Operator is not
overloaded<br>mysqlku.pas(76,32) Error: Illegal qualifier<br>mysqlku.pas(76,35) Error: Illegal expression<br>mysqlku.pas(77,35) Error: Illegal qualifier<br>mysqlku.pas(77,38) Error: Illegal expression<br>mysqlku.pas(78,37) Error: Illegal qualifier<br>mysqlku.pas(78,44) Error: Illegal expression<br><br>It's look that the interface has changed. But where can we get and follow its change?<br>Thanks<p>
<hr size=1>Building a website is a piece of cake. <br>Yahoo! Small Business gives you <a href="http://us.rd.yahoo.com/evt=48251/*http://smallbusiness.yahoo.com/webhosting/?p=PASSPORTPLUS">all the tools to get online.</a>