ODBC Mysql lazarus / 16-Databases ---------------------------------------------------------------------- syalyshev · 2023-05-02 11:39 Screen shot of Connector/ODBC attached. The knob "Test" returns: QuoteConnection successsfulPascal (Lazarus) code is: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TMainForm.Connect_DB();begin   if ODBCConnection.Connected Then ODBCConnection.Close;  ODBCConnection.DatabaseName:='odbc_Mysql';  ODBCConnection.UserName:='operator';  ODBCConnection.Password:= 'alfasatcom';  ODBCConnection.Params.Add('DATABASE=kizs');  ODBCConnection.Params.Add('AUTOCOMMIT=1');  try     ODBCConnection.Open;    edMess.Text:='Connection to Mysql database "kizs"=OK!'  except        on E: ESQLDatabaseError do        edMess.Text:=E.Message;  end;   ODBCConnection.Transaction:=SQLTransaction;  SQLQuery.Active:=false;  SQLQuery.SQL.Clear;  SQLQuery.SQL.Text:='SET NAMES "binary"';  SQLQuery.Active:=false;  SQLQuery.SQL.Clear;  SQLQuery.SQL.Add('select * from report_xpol order by id DESC limit 100');  SQLQuery.Active:=true;   SQLQuery.Refresh;  Confirm_Connection.Caption:='Connected to DataBase'; end; When I run the program it gives: QuoteCould not connect with connection string "DSN=odbc_Mysql;UID=oper ator;PWD=password;DATABASE=kizs;AUTOCOMMIT=1;". ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: IM014; NativeError: 0; Message: [Microsoft]………………….. What have I done wrong? ---------------------------------------------------------------------- Zvoni · 2023-05-02 11:42 and your question is what? ---------------------------------------------------------------------- syalyshev · 2023-05-02 11:58 Sorry! I corrected my message! Please see above! ---------------------------------------------------------------------- marsupilami79 · 2023-05-02 13:37 Hello syalyshev, Quote from: syalyshev on May 02, 2023, 01:39:10 pmQuoteSqlState: IM014; NativeError: 0; Message: [Microsoft]…………………..The Message part would have been the interesting part But according to the SQL state IM014 and this post on StackOverflow you might be trying to use a 32 bits ODBC driver with a 64 bits application or vice versa. So you could try to change the Architecture of your program from 32 to 64 bits or vice versa. Or you could use a different ODBC driver. With best regards, Jan ---------------------------------------------------------------------- syalyshev · 2023-05-04 05:31 Dear marsupilami79, thanks a lot! I have done what you advised and it worked fine! My best regards!