Problems with Dbgrid? how I see my table B.C. lazarus / 16-Databases ---------------------------------------------------------------------- BlackCat · 2008-05-07 19:18 Hi, I have a big problem, because, Ican't see my sql table in the DbGrid. I change this properties and don't happened nothing in my dbgrid: in mysqlconnection.connected= "true" don't allow me change to TRUE.. I included in a botton and also directly in the component sqlquery.sql.text:='select * from my_table' sqlquery.open; // is the same if I use sqlquery.execsql?? considering all my componets to enabled the connection my problem is that datasource I can't see my table I saw that I need use sqlquery.active:=true; to activate the sql instruction in my dbgrid.. What's wrong???? Can somebody help me?? If you have an EXCELLENT manual "how to use databases component"  it's really wonderfull to me thanks a lot...BlackCat from  Slp,Mexico [/code][/list] ---------------------------------------------------------------------- petrut · 2008-05-12 06:06 Hi, send me please a personal email :  petrut at wanadoo dot fr I will send you a tutorial about the connection to firebird using zeos components bye ---------------------------------------------------------------------- BlackCat · 2008-05-12 17:38 I Send you a email, checks this one please ---------------------------------------------------------------------- OnixJr · 2008-05-17 14:28 QuoteI will send you a tutorial about the connection to firebird using zeos components Why not publish it on Lazarus wiki? Regards, Júnior ---------------------------------------------------------------------- BlackCat · 2008-05-22 22:27 Quote from: "BlackCat"I Send you a email, checks this one please Thanks for your reply , but i'm just working with MYSQL, and is very different ways to connect one and the other Finally I change this in my small application and is working now..!! In the  SqlQuery I changes this values in Properties: Database:my_sqlConnection DAtasource:(none) Transaction:my_SqlTransaction then, I use a botton and add sqlquery1.Active:=true; and then It shows my table the first time, but when I click again, It shows me this mesagge: "Operation cannot be performed on an active Dataset" then I modify Code: [Select] //to show table in the dbgrid sqlquery1.Active:=true; showmessage('hi');// to break for a moment and experiment with the next instruction sqlquery1.close;            but when "I aceppt" the show message my information in the DbGrid dissapeared, but when I click the botton again the message:"Op...Dataset" not happend.. 1. Why?  Can somebody Explain what about SqlQuery (in the properties:.active, sql.text, .open, .close)   functions  ???? It's so complicated..! :roll: Sorry for my bad English.. :oops: 2. And other question, I check the forum in "Database" Section but I don't know when the Lazarus 0.9.24 is working , because the first post about "Databases" -since  recient post 2008 to january 2006- cann't give it me answers, because maybe this componentes change in the first version or maybe doesn't exist yet.. Gracias...!  BlackCat ---------------------------------------------------------------------- sakuragi · 2008-06-24 20:42 Hola blackcat, ya pudiste solucionar el problema, yo tengo el mismo problema, no me sale el resultado de la consulta en el DBgrid, si es posible, comparte la solucion. saludos gracias ---------------------------------------------------------------------- BlackCat · 2008-07-05 07:29 Quote from: "sakuragi" si es posible, comparte la solucion. The solution for me was: change in PROPERTIES of the componets: In the SqlQuery1 I changes this values in Properties:    {this}    SqlQuery1.Datasource:=(none)<-                   .Database:=my_sqlConnection                   .Datasource:=(none) <-                   .Transaction:=my_SqlTransaction    {/this} then, in the    dbgrid.datasource:=datasource1;<-    datasource1.dataset:=sqlQuery1;<- when you are searching (with Select SQL instruction) datas in your table:    SQLQuery1.SQL.Text:='Select (fields) from (table):'    SQLQuery1.Open; It's working now..!!But when I use "update", "Insert" ...I need change: Datasource1.dataset:my_SqlQuery1; <- When i Insert, or Update SQL instructionfor a   data in my table I use .Add:    SqlQuery1.SQL.Add('Insert into (table) values (my_values)');    SQLQuery1.EXECSQL; You need check, because I use the same DATAMODULE for Insert,Update, Select SQL instructions, and I change the values.. in my datasource, etc. Ok. You catch them? But when I use for example Firstly     SQLQuery.text("select .........";);               SQLQuery.Open;               {here***} Secondly SQLQuery.text("select ....te same or other ...";);               SQLQuery.Open; This error shows "Can't be worked in a Active Dataset" I add in {here***}= SQLQuery1.close; But I lost the my datas from the "Firstly",... When I  OPEN  inmediately I CLOSE the SqlQuery...If you found the ANSWER  to use OPEN-CLOSE, posted it please....! Saludos..