+ 2

How can I run pro*c in linux?

I would to run embedded sql. What is the requirement to using it? Can anybody help me?

8th Jan 2020, 5:39 AM
Faizal
Faizal - avatar
16 Respuestas
+ 1
Hi Faizal So, if I got your question right you would like to create and manipulate mysql database tables using embedded SQL queries in your C program, right? Well, you can check the mysql documentation to find the functions you need. For the code you will need to install the development package of mysql and include the header "mysql.h". To compile your code, lets say in GNU/Linux using GCC, you can use: $ gcc code.c -o code.exe `mysql_config --cflags --libs`
9th Jan 2020, 1:12 PM
Mark
0
What is code.exe?
9th Jan 2020, 2:31 PM
Faizal
Faizal - avatar
0
In gcc, when compiling you code, that in my example is named "code.c", you can also pass the argument -o and specify a name for the output executable, that in this case I named "code.exe" but you can give whatever name you want.
9th Jan 2020, 2:47 PM
Mark
0
How if i use proc code.pc? It will produce code.lis & code.c
9th Jan 2020, 2:49 PM
Faizal
Faizal - avatar
0
Why you want to use proc?
9th Jan 2020, 2:53 PM
Mark
0
In this case i am using firebird as mydb. But i don't know how to connect to the db I tried to find any reference, but it can't connect
9th Jan 2020, 2:58 PM
Faizal
Faizal - avatar
0
Which GNU/Linux distro are you using? Ubuntu?
9th Jan 2020, 3:04 PM
Mark
0
I am using debian as my OS.
9th Jan 2020, 3:04 PM
Faizal
Faizal - avatar
0
Hi Faizal I am setting up firebird on my GNU/Linux so that I can help you better. Which version of firebird are you using? The 3?
9th Jan 2020, 4:41 PM
Mark
0
Yes, i used version 3.0 Please help me, because it is very important for my job
9th Jan 2020, 6:30 PM
Faizal
Faizal - avatar
0
Ok. I did some search and seems that the use of the C api is not very well documented and there is some wrappers that facilitates the task. Do you have to use C or C++ is enough? Or do you have the possibility to choose the language?
9th Jan 2020, 6:47 PM
Mark
0
I have tried to using php but my boss told me to access firebird over C and as you know that the C api is not very well documented, so it is make me confused.
9th Jan 2020, 6:52 PM
Faizal
Faizal - avatar
0
Is it urgent? I will need to do some experiments to be sure of a suitable way of accessing firebird using the C API since I did not have to do it before.
9th Jan 2020, 6:56 PM
Mark
0
It is not urgent right now, so you can do some experiment about accessing firebird over C. actually I don't know how to CRUD over C because the source is too little
9th Jan 2020, 6:57 PM
Faizal
Faizal - avatar
0
What you mean the code is too little?
9th Jan 2020, 7:13 PM
Mark
0
Sorry, i mean is not the code but the source in google and not very well documented. That make me confused. I think i can't do experiment just from reading, so i need someone to tech me
9th Jan 2020, 7:16 PM
Faizal
Faizal - avatar