Hi All,
I'm a Newbie to Lazarus (worked with Delphi more than 10 years ago ...).
I've spend all day now to search the forums ... with no result ... so here I am.
I'm working on an application that needs to connect to a MSSQL Database (MSSQL 2008 R2).
Here is my situation:
1. I've created an ODBC entry for the MSSQL Database.
2. I added the ODBCConnection component to my form and applied the connection data
3. I added a Datasource and SQLQuery component and linkend them.
4. Also added a SQLTransaction component and linked it to the others as well.
I activated the connection and datasource successfully.
... all fine and dandy ... so far.
In the SQL property of the SQLQuery I can enter my SQL statement and even get a result from the connected database.
I added a DBGrid component to my form, linked it with my datasource.
Now if I run my application, I can't set the Active property of the SQLQuery component to true
[ SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Text := 'select * from FixNames';
SQLTransaction1.Active := True;
SQLQuery1.Active := True;
SQLQuery1.Open; ]
and hence the DBGrid does not show any content.
I'm also unable to activate the SQLQuery component in the IDE as well.
Before I start a discussion, why not to use the MSSQLConnection component -> I would need to recompile the fpc, since the dblib.dll is not set to "ntwdblib.dll" ... and I have no clou how to do so ...
I think I'm missing something minor, since the SQL statement works fine in the SQL property.
Maybe one of you Pros have a idea ...
Thank you all for your help.