|
|
Home » Developing U++ » UppHub » Firebird connection problem
Firebird connection problem [message #49261] |
Sat, 13 January 2018 04:16 |
|
Hi-
I am trying to get firebird from the bazaar working.
Under build methods I don't know the option with the keyboard to add an include directory.
I can only find directories already included. There is no plus symbol that I can click on to add
an extra text control. Running virtualbox with xfce and fedora 27.
I tried clicking the arrow or pressing return. It won't drop down to a blank input field so I can
add the header directory for firebird.
I am also stuck on trying to get the db to connect with firebird.
I tried this:
CONSOLE_APP_MAIN
{
FBSession s;
s.Connect(
"hotchicken",
"localhost",
"sysdba",
"masterkey",
NULL
);
Sql stmt(s);
stmt.SetStatement("Select * from Country");
stmt.Run();
.... more code goes here
It did not connect. I also added a dll to my project where the firebirdTest.cpp file
is located - libfbclient.so. I also replaced masterkey with my passwd.
I don't know if I can't connect because I didn't list the include directory for firebird
under the build methods because the GUI is acting up a little.
Novo was using cmd_line[0] and cmd_line[1] for arguments. Not sure what that was about.
I figured used the same session connect and put in the strings instead of cmd_line[number].
Please assist if you have a moment and any cool ideas.
thx. - mtdew3q
[Updated on: Sat, 13 January 2018 19:22] by Moderator Report message to a moderator
|
|
|
|
Re: help with sql and ide trick - IDE not rendering control quite right [message #49263 is a reply to message #49262] |
Sat, 13 January 2018 07:27 |
|
Hi-
I obviously looked at the commandLine() function etc. located in console_app_main in firebird test.
It is just a way to gather arguments passed to the command line.
Well... I added the header and dll files I thought I need for firebird to work.
I added libfbclient.so and ibase.h.
Not sure why it doesn't connect for me with g++.
I even added an include directory for firebird header files.
If anyone spots any reason why it may not connect I am all ears.
I noticed Novo said he fixed compilation issues with msvc. I think that is different than g++.
I do notice that it compiles correctly under g++.
My money is on novo, and I am doing something thick-headed.
I might add that I used a build after Novo posted it was fixed in Nov. 2017.
Since it fixed the compilation error, I am sure I got a good enough fix version.
I will hang out for a day or two and see if anyone has an idea.
If not, I have another idea for later.
thx.-
have a cool weekend-
mtdew3q
|
|
|
Re: help with sql and ide trick - IDE not rendering control quite right [message #49267 is a reply to message #49263] |
Sun, 14 January 2018 00:30 |
|
--------------------------------------
Subject: connecting to firebird
--------------------------------------
HI-
I am having a little difficulty connecting to firebird.
I use firebird with v. 2.5.7 fedora 27 xfce with g++.
My version of ultimate is 11540 compiled 12/20/2017.
I put package firebird from bazaar in my project.
In debug build methods I put:
-lpng16 -lz -lfreetype -lfbclient
I added include directory:
/usr/local/firebird/include
I added lib directory:
/usr/local/firebird/lib
[#include <Core/Core.h>
#include <Firebird/Firebird.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
FBSession s;
s.Connect(
"/usr/local/firebird/examples/empbuild/employee.fdb",
"localhost",
"sysdba",
"masterkey"
);
Cout()<<"foo";
}
I added the library libfbclient.so.2.5.7 as a file in my
project directory.
I get the error message when execute:
throwing instance of ibpp::DBExc.
The code never prints "foo".
If you scan this and I am making glaring error(s), please let me know.
Thanks for any cool assistance. I will be around on this 3 day weekend
checking in off and on to see if anyone has some tips.
Thx-
mtdew3q
|
|
|
Goto Forum:
Current Time: Fri Mar 29 16:44:18 CET 2024
Total time taken to generate the page: 0.01209 seconds
|
|
|