Programming :: Write A Program That Interacts With MySql In C

Mar 28, 2011

Im trying to write a program that interacts with MySql in C . Im using slackware 13.1 64 bit and Ive installed MySql , getting help from this page : [URL] .

This is the program I have ( I know they arent any vars here , i just thought it wasnt necessary )

Code:
#include <stdio.h>
#include <mysql/my_global.h>
#include <mysql/my_sys.h>
#include <mysql/mysql.h>

[Code]....

This program is from the MySql website ( a tutorial they have up there ). When I run this program I get hundreds of lines of errors , nothing related to my program , but the headers, indicating that there are syntax errors and all kinds of other problems in them.

View 8 Replies


ADVERTISEMENT

General :: Write A Simple Program C++ To Connect To Mysql Database?

Sep 5, 2010

I'm trying to write a simple program c++ to connect to Mysql database based in my 127.0.0.1 server:

int main (void) {
cout << "33[2J" << "33[0;0f";
MYSQL mysql;
MYSQL *conn;

[code]....

View 2 Replies View Related

Programming :: Write A Program (in C)?

Feb 26, 2010

I want to write a program (in C), which does 4 or 6 simultaneous calculation. Is there away of doing something like:

do at the same time{
Core 1 do:
this_thing_1

[code]....

View 3 Replies View Related

Programming :: Write A Small Perl Script To Collect Some Info From Mysql?

Oct 10, 2010

am running Centos 5.4 and would like to write a small perl script to collect some info from mysql.

so I went
yum install perl-DBI
yum install perl-DBD-mysql

then

nano perl.pl
---
#!/bin/perl
use Mysql;

[Code].....

Why can't perl find Mysql.pm? I guess because it doesn't exist as I ran find / -name Mysql.pm, and also could not find it.

shouldn't that file have been created and thus exist after I install perl-DBD-mysql?

View 6 Replies View Related

Programming :: C++ Program Does Not Write File

Jun 26, 2011

I have the following problem. I call a C++ program from a Java servlet by using Runtime exec. The OS is ubuntu and I use Netbeans 7.0 with Glassfish 3.1 web server.The program executes but it does not open and write into a specified file in a specified folder. The same C++ program compiled under Windows opens and writes this file.How can I solve this problem in Linux?

View 2 Replies View Related

Programming :: Write A Customized Program For Business?

Dec 13, 2010

My company manufactures satellite TV receiveing equipment. Out current software is quite long and and a bit of an annoyance for customers. I would like the help of a programmer to create for us a customised, easy to use GUI, built to our specification.

View 2 Replies View Related

Programming :: Write The Value To The Proc Entry In The Program?

May 1, 2011

I have a kernel module program which is used to create a entry in the proc file system. I have to read and write values in the entry. Its taken from a online tutorial stuff.how to write the value to the proc entry in the program ?

View 1 Replies View Related

Programming :: How To Write Simple C Program In RHEL5

Sep 17, 2010

How can i write a simple c program in my RHEL5?I am more concerned about what are toosl i need to install to get a C platfrom running in my RHEL5?

View 14 Replies View Related

Programming :: C - When Write A Program That Gives The Segmentation Fault Error

Jun 9, 2010

I am using Ubuntu 9.04 linux 2.6.28-11-generic. When I write a program that gives the "Segmentation fault" error, or when I send this signal (SIGSEGV) to a program, the "Segmentation fault" is shown and no core dumped. When I look for "core" file in the current directory, I can't find it, too.

View 2 Replies View Related

Programming :: Write A Program In C Which Will Generate A Maze Randomly ?

Oct 8, 2010

I want to write a program in C which will generate a maze randomly and find the solution for it ..

The idea behind is in [url]

How the 16 bit integer is stored in a variable..Earlier I wrote a program on trees and displayed it using dotty.. Is there any such tool to display a maze..I am using ubuntu 10.04.

View 1 Replies View Related

Programming :: Write A Program In C To Detect The Ethernet Cable?

Mar 11, 2009

write a C program to detect whether the Ethernet cable is plugged or unplugged. I found out by using a command "nm-tool" in Linux terminal will show me whether a Ethernet cable is plugged or not. If Ethernet cable is plugged, in the device part of eth0, the Hardware Link of Wired Settings will indicate a "yes" and "no" if no Ethernet cable. Hence, in my previous code, I use one function called popen to read the state as shown below:

PHP Code:

[code]....

However, now my project wish to not use the NetworkManager (where the "nm-tool" command comes from). And this gives me trouble to detect the Ethernet cable. So is there any other method for me to detect the Ethernet cable in C programming?

View 8 Replies View Related

Programming :: Write A Simple Character Printing Program Using NASM?

Jul 27, 2010

i tried a code to accept a character and print the same ! i can accept it with following code but its not working with printing that character i use NASM version 2.07

Code:

segment .data
msg1: db 'Enter a key',10
msg1len: equ $-msg1

[code]....

View 3 Replies View Related

Programming :: Write A Program Which Will Read Input From A Text File

Apr 7, 2010

i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...

[Code]....

View 2 Replies View Related

Programming :: Write A Small Program That Shows Some Stockquotes And Indexes Etc On The Desktop?

Aug 29, 2010

I want to write a small program that shows some stockquotes and indexes etc on the desktop. Does anyone know how to get the quotes from google, yahoo etc? Do I rip it from the webpages or is there some other way?

View 3 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):

#!/bin/sh

clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

Programming :: Write A Program In C That Can Sniff Packets From Ethernet And Distinguish RTP Packets From Non-RTP Packets?

Aug 30, 2010

i need to write a program in c that can sniff packets from Ethernet and distinguish RTP packets from Non-RTP packets, i have no idea what should i do

View 9 Replies View Related

General :: Can't Write In Program Window

Jan 11, 2010

I have a diction(english-bulgarian-english) program which have only windows version and I installed it in my slackware trough wine. The problem is that I can't write a word in bulgarian into it. When in english layout i can write, but when change to bulgarian i can't. I click in the field for the words but just can't.Can be the problem from my system locale, because some programs in bulgarian can't be translated and I see symbols.
Help

View 2 Replies View Related

Software :: Best Program To Write Algorithm?

Oct 5, 2010

What would be the best program to write my algorithm, before sending them to my teacher?

View 4 Replies View Related

Ubuntu :: How Interacts With Domain Users When On The Windows Domain

Feb 3, 2010

At work, we run Windows... Windows domain, windows workstations, etc. Today my boss asked me my thoughts on running an Ubuntu lab within the mixture of our existing Windows setup.

Well, that brought several questions to mind. So I understand you can bind an Ubuntu computer to a Windows domain, seems easy enough, whether you do it through Samba or the other guide I read that I kind of forget at the moment, but anyway...

I was just curious how Ubuntu interacts with domain users when on the windows domain. For example, if we have an Ubuntu machine on the Windows domain with a local user "administrator" and that's it, would any domain users be able to log into the Ubuntu work station, similar to how it is on Windows?

View 7 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

General :: Embedded Webserver (mysql) On A Compact Flash: Reduce Read / Write Operations?

Jul 7, 2011

I've developed a tiny webserver for home automation out of an ALIX 1D, and based on a debian lenny. It runs very smoothly and is now able to operate quite a lot of different equipment from a webapp. But i'm not sure how I should handle the compact flash, regarding read/write limitations. From what I've read the partitioning should be ext2, which would disallow the journalisation of the system. A utility to 'flatten' the repartition of write cycles exists, would it be relevant to use if the partition is ext2 ?

I will also disable all logging in execution mode (a debug mode will provide the logs). Is there any other parameters I have to take into account for maximum reliability (i.e. does the system randomly write in some files for various and potentially turned off purposes)? As for the mysql database, it's not important data, and it's actually reconstructed every time the server boots. Given this, is there a way to store the db in RAM rather than in a file? I'm not sure it's the right place to ask, but I sometimes see redirection to here from stack overflow.

View 2 Replies View Related

Ubuntu :: Program To Write Commands Like Code?

Nov 14, 2010

I'm a noob in Ubuntu. I need the program which will help me to learn different ubuntu commands. I often forget them and after reinstall I don't want to search them in Google. Now I write them in the standard text editor and my code looks like this:

Restore MBR:
Delete GRUB (fixmbr)
Ubuntu terminal then:
sudo apt-get install ms-sys
sudo fdisk -l

[Code]...

View 2 Replies View Related

Debian :: Apt-get Install <program>-mysql - What Does This Do?

Nov 16, 2010

I just have a quick question. I was following a Snort setup guide and it told me to do apt-get install snort-mysql. I just wanted to understand the functionality of such a command where you specify a program and then do a -mysql (snort-mysql). Does this configure an SQL database for that specific application or what?

View 2 Replies View Related

Ubuntu Multimedia :: Program That Can Write Lyrics To A MP3 File's Tag?

Jan 5, 2011

Preferably synchronized lyrics, and would also be best if it automatically was able to fetch them from some website.

View 4 Replies View Related

General :: How To Write Boot Program Into Floppy Image?

Sep 29, 2010

OS: Windows XP
Virtual Machine: Bochs-2.4.5

I want to learn some details about linux booting, so I begin writing a small boot program myself. Yesterday, I was writing a small boot program and planned to use it boot a Bochs virtual machine. The boot program is written in assembly language and compiled with nasm.I use bxiamge.exe in Bochs and create an floppy image called boot.img and configure the Bochs virtual host to boot from this floppy image. My question is how to write the compiled boot.bin program into the floppy image(boot.img)?

View 1 Replies View Related

Ubuntu :: Adding Program To Run Before MySQL Shuts Down?

Mar 2, 2011

I'm interested in finding out, specifically, what causes daemon's to be shutdown when I shutdown Ubuntu? I'm use Ubuntu which is why I'm posting here, but I suppose this knowledge could apply to other Disto's too. Perhaps I'm better off to explain with an example:

I wrote a C++ that queries a Mysql database. I want it to run every time the computer is shutdown. I've verified the program works fine, and I've verified that I can run a program on shutdown of the computer by putting it in /etc/rc0.d. The problem is that by the time rc0.d runs my program, mysql has already been shutoff, and it can't connect.

So what I'm wondering is, is there a script or something at a higher level that goes around turning things like daemons as the System shutdowns, but before any of the scripts in rc0.d are run? (It doesn't look like anything in here is shutting down mysql). Something that actually calls mysql shutdown? How I can add my program to be run before mysql shuts down.

Otherwise, I might end up having to get the source code compile by own /sbin/shutdown and tweak it from there. Granted I might end up doing this anyway because there's more stuff I want to customize during shutdown (e.g. abort it under certain conditions), but I'm hoping not to go that far just yet.

View 2 Replies View Related

Programming :: Error ""Can't Connect To Local MySQL Server Through Socket" In Connecting To MySQL In C Language

Sep 29, 2010

I wrote a code in C to connect to MySQL by using mysql_real_connect function but I recieved error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" (by using mysql_error function).

I also did the following things: in mysql I typed 'SHOW VARIABLES LIKE '%SOCKET%'', it returned /var/lib/mysql/mysql.sock I typed 'mysql_config --socket' in shell, it returned /var/lib/mysql/mysql.sock I modified /etc/my.cnf file

View 3 Replies View Related

Software :: Timed Startup - Program Or Any Script Write For Ubuntu?

Jul 5, 2011

I'm using a program called Auto Power on and Shut down on Windows. It let's me set times for the computer to shutdown, power on, hibernate, sleep, and etc. Is there any program or any script you can write for Ubuntu that lets you do this? I need something like: Tell computer to turn off at 10am. *run programs* Tell computer to (does Linux have hibernate?) something that isn't shutdown but looks like it's shutdown at 5pm. I use hibernate in Windows.

View 11 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Ubuntu Installation :: Alt+Tab Doesn't Work / Suddenly Cannot Write In Active Program

May 10, 2011

I have updated my Ubuntu installation to natty narwhale and after a reboot the desktop started to look like the attachment Screenshot.jpgThe error does not appear when I choose ubuntu classic instead the windows miss the top bar where the X (close button) is placed.Alt+Tab does not work, and suddenly I cannot write in the active program.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved