> 2. I expect TSQL40Connection to give problems with MySQL 4.1.12-standard. > I think you should use TSQL41Connection. > Unfortunately they are not binary compatible. > (Complaints should go to to [EMAIL PROTECTED])
TSQL41Connection raises an exception with message: "TSQL41Connection can not work with the installed MySQL client version (4.0.24)." I checked this and thought that is caused because of MySQL version but I'm not sure. > 1. Did you set the 'Database' property of your TSQLQuery component ? Sorry, TSQLQuery-TSQLConnection relation somehow was broken, I should check once again, I apologise. Now, all seem to be in place but running following code I get error: - http://www.magentadb.gr/ftp/sql-conn.png at lines: SQLQuery1.SQL.Text := 'show databases'; showmessage( SQLQuery1.SQL.Text ); SQLQuery1.Open; SQL statement is just "show databases", as you can before executing I check is once again using showmessage(). Trying from Windows Delphi, It is connected using same user account. The code from sample aplication is: procedure TFormTryMySQL.ConnectButtonClick(Sender: TObject); begin // Check if we have an active connection. If so, let's close it. if MySQLConnection1.Connected then begin SQLTransaction1.Active := False; MySQLConnection1.Close; end; // Set the connection parameters. MySQLConnection1.HostName := HostEdit.Text; MySQLConnection1.UserName := UserEdit.Text; MySQLConnection1.Password := PasswdEdit.Text; MySQLConnection1.DatabaseName := 'mysql'; // MySQL is allways there! ShowString('Opening a connection to server: ' + HostEdit.Text); MySQLConnection1.Open; // First lets get a list of available databases. if MySQLConnection1.Connected then begin ShowString('Connected to server: ' + HostEdit.Text); ShowString('Retreiving list of available databases.'); SQLQuery1.SQL.Text := 'show databases'; showmessage( SQLQuery1.SQL.Text ); SQLQuery1.Open; while not SQLQuery1.EOF do begin DatabaseComboBox.Items.Add(SQLQuery1.Fields[0].AsString); SQLQuery1.Next; end; SQLQuery1.Close; ShowString('List of databases received!'); end; end; Panagiotis > Στις 13-03-2006, ημέρα Δευ, και ώρα 16:54 +0100, ο/η Michael Van Canneyt > έγραψε: > > On Mon, 13 Mar 2006, Panagiotis Sidiropoulos wrote: > > >> You need the latest svn-version from fpc. > >> All non-visible components are part of > >> the FCL of fpc. > > > > OK, Everything is installed and available for use. I use > > TSQL40Connection on MySQL 4.1.12-standard. Sample program TryMySQL > > (ptrmysql) connects but on any SQL statement it raises an exception with > > message "Database not assigned". I double checked login user privileges > > and it is OK, I even try with admin privileges. > > 1. Did you set the 'Database' property of your TSQLQuery component ? > > 2. I expect TSQL40Connection to give problems with MySQL 4.1.12-standard. > I think you should use TSQL41Connection. > Unfortunately they are not binary compatible. > (Complaints should go to to [EMAIL PROTECTED]) > > > Michael. > > _________________________________________________________________ > To unsubscribe: mail [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives > _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
