[HELP] Connecting to a SQL - Console Application lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- nobodyknowsme · 2014-12-16 14:00 I want to connect my console application to my SQL database. I have my SQL database set up. How would I connect or link my website? In my SQL database I have a table storing all my users and such. I've tried to use this code but it isn't recognizing TSQLConnection, also this is for the offline SQL database. Are there any good ways of connecting my console application to my database easily? Website where I got the following code from: http://wiki.freepascal.org/SqlDBHowto/nl The code from the website. I basically just want to link my console application with my SQL database. Maybe link my users so that they can sign in the application using there website details.  Code: [Select]Program ConnectDB  var AConnection : TSQLConnection;  Procedure CreateConnection;  begin    AConnection := TIBConnection.Create(nil);    AConnection.Hostname := 'localhost';    AConnection.DatabaseName := '/opt/firebird/examples/employee.fdb';    AConnection.UserName := 'sysdba';    AConnection.Password := 'masterkey';  end;  begin    CreateConnection;    AConnection.Open;    if Aconnection.Connected then      writeln('Succesful connect!')    else      writeln('This is not possible, because if the connection failed, an exception should be raised, so this code would not be executed');    AConnection.Close;    AConnection.Free;  end. ---------------------------------------------------------------------- nobodyknowsme · 2014-12-16 14:08 EDIT: I have added sqldb to the uses and it now recognises TSQLConnection however it will now not recognize TIBConnection.Create(nil);. Any idea why? ---------------------------------------------------------------------- Leledumbo · 2014-12-16 17:25 Quote from: nobodyknowsme on December 16, 2014, 03:08:08 pmEDIT: I have added sqldb to the uses and it now recognises TSQLConnection however it will now not recognize TIBConnection.Create(nil);. Any idea why? Look for the unit where TIBConnection is declared. ---------------------------------------------------------------------- nobodyknowsme · 2014-12-17 07:44 It's being declared at AConnextiln := Tcpnnextion That's where, the first place it appears in the code. Any help? ---------------------------------------------------------------------- rvk · 2014-12-17 09:30 Quote from: nobodyknowsme on December 17, 2014, 08:44:57 amQuote from: Leledumbo on December 16, 2014, 06:25:15 pmLook for the unit where TIBConnection is declared. It's being declared at AConnextiln := Tcpnnextion That's not what Leledumbo meant. You needed to look in what unit TIBConnection was defined (IBConnection) and you needed to add that to your uses-clause. I already mentioned this in your other post. That's why it's not really practical to open more posts about the same issue. For all concerned... maybe ignore this thread and continue in this one. ---------------------------------------------------------------------- marcov · 2014-12-17 10:42 I agree one thread is enough, I've locked this thread since it has the least info in it.