473,608 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to connect mysql5 using c++ in redhat-linux

how to connect MySQL using C++ in redhat ....

can any one tell a sample of code to creat ,connect and execute the
statement in c++ code ...

please help me .....

Feb 14 '07 #1
3 5103
What I did, because in C++ you can't be sure what's next morning, is I got
the C functions and created a class.
So using the C functions makes me for up to now after 3 years not having
changed much the code...
Perhaps I can send it to you, allthough, it sucks really.
Feb 14 '07 #2

can u send the code to me ... u can paste in this itself for furture
purpose , someone will help full for them ...
please paste the code as soon as possible ;

Feb 16 '07 #3
Hi guys ..Sorry - I hope to get soem respons regarding VBS

I got this surgestion from one swedish Guy:

strSQL= "SELECT cast(100.0*SUM( CASE Q1 WHEN 'nej' THEN 1 ELSE 0
END)/COUNT(*) as decimal(5,2)) FROM bruger_evalueri ng "

But I really dont know what to do with it.

Yopu can se my page at
http://www.gymnasiereform.dk/svar_q12.asp here it works fine - I get the %
of the different answers but this is with an Access DB - now Im trying to
do the same with a MY SQL DB ... but cant make the calculation for %
plaese help ..
Otto
Feb 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1966
by: Mechphisto | last post by:
Not sure if this is truly a mySQL issue or a PHP issue, since the problem started when I reconfigured/made a PHP upgrade:We're using RedHat ES2.1. With PHP 4.1.3 and phpMyAdmin 2.5.6, it was working fine. Then I upgraded to PHP 4.3.4. And I started getting the error: MySQL said: #2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) through phpMyAdmin, and from mySQL at the command line: #2002 - Can't connect...
12
3612
by: Sarah Tanembaum | last post by:
Though I installed MySQL5 and PHP5, how come my phpinfo() shows as follow: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.57 <<<<<<<<<<<<<<< Instead of saying 3.23.57, shouldn't it show 5.xx.xx? Or, did I do something wrong?
1
2526
by: Claus van de Vlierd | last post by:
Hello , a) in the following script (under RedHat AS3 with PHP 4.3.2 ) I make a "DB::connect" to an existing "mysql" database named "docu_files_of_cvdv" . The strange thing is : it works -- even if I give as protocol the string "nonsenseprotocol" (instead of "unix" or "tcp") and as Hostname "nonsensehostname" ... !!
4
3005
by: Denis Labon | last post by:
I can't connect to mysql server using the mysql-connector-java-3.0.11. I was able to run the same program when I was running Suse 9.0 but since I install Suse 9.1, I can't connect. The error message is: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused I'm using mysql-standard-4.0.14 and able to get in the mysql server by typing: bin/mysql -uroot -ptest
1
121521
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is not workable
3
1491
by: jnair | last post by:
Hi , I am using python2.4 "urllib2" and "cookelib". In line "5" below i provide my credentials to login into a web site.During the first attempt i "fail", judging from the output of line "6". I try again and the second time i succeed,judging from the output of line "8". Now using the "twill" module (http://www.idyll.org/~t/www-tools/twill/)
1
1579
by: jnair | last post by:
Hi , I am using python2.4 "urllib2" and "cookelib". In line "5" below i provide my credentials to login into a web site.During the first attempt i "fail", judging from the output of line "6". I try again and the second time i succeed,judging from the output of line "8". Now using the "twill" module (http://www.idyll.org/~t/www-tools/twill/)
0
1364
by: ojorus | last post by:
Hi; I am using the mysqli-extension on all my database queries. Everything worked just fine when I used MySQL 4, but when the database was upgraded to MySQL 5 (5.0.22), I got a strange error. Here is an example: function example(){ global $table, $mysqli; $min = 2; $stmt = mysqli_prepare($mysqli, "SELECT SUM(Id) FROM $table WHERE
3
1522
by: toyin | last post by:
hi, am having problem connecting to MYSQL5.1 from VS.Net.the error is database reeor:System.Data.SqlClient.SqlException:An error occur while establishnig a connection to the server. Am Using Visual Studio.Net 2003, IIS 5.0 and MySql5.1. am trying to retreve a new record from a database using a webservice. here is the sample code Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.Services
4
1458
by: opswordfish | last post by:
Hi I've visited a lot of forums regarding getting MySQL5 working with PHP5 in IIS and it seems that with MYSQL5 you need to use mysqli in PHP and that you need to uncomment the extension in php.ini However I have tried both of these and I still get the error: Fatal error: Call to undefined function mysqli_connect() I was wondering if somebody can help? It's probably something simple I've forgot to do.
0
8000
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8470
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3960
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1328
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.