[Qt-interest] Fwd: Qsql Plugin Problem:-cant install sql plugin
Yuvaraj R
yuvaraj at ongobiz.com
Thu Sep 24 14:18:57 CEST 2009
Which platform you are using ?
Thanks
Yuvaraj R
---------- Forwarded message ----------
From: RPREMANAND RPREMANAND <premndbe at gmail.com>
Date: Thu, Sep 24, 2009 at 5:41 PM
Subject: Re: [Qt-interest] Qsql Plugin Problem:-cant install sql plugin
To: Yuvaraj R <yuvaraj at ongobiz.com>
Hi,
Im trying to install SQL plugins .After I tried reading how to install
sql plugins .I went to the plugin directiory and added usr/include and
usr/lib directory which has sql drivers and libraries and after i tried
qmake *.pro
and make
It gives error cannot find lmysqlclient_r ,library
I followed all the steps in How to install but cannot install the sql
Plugins .give me any Hint Notes.
Thanks in advance,
Prem.
On 9/24/09, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
>
> Hi All
>
> I added some details to my database..
>
> once i close the application and again open means ..nothing it displaying..
>
> My Code is
>
> #include "mainwindow.h"
>
> #include "ui_mainwindow.h"
>
> #include <QTableView>
>
> #include<QMessageBox>
>
> #include <QSqlQuery>
>
> #include<QDebug>
>
> #include <QSqlRecord>
>
> #include <QInputDialog>
>
> MainWindow::MainWindow(QWidget *parent)
>
> : QMainWindow(parent), ui(new Ui::MainWindowClass)
>
> {
>
> ui->setupUi(this);
>
> create_tables();
>
> QSqlQuery query("SELECT * FROM employee");
>
> QSqlRecord rec = query.record();
>
> int a = rec.indexOf("name");
>
> while(query.next())
>
> {
>
> qDebug() << query.value(a).toString();
>
> }
>
> }
>
> MainWindow::~MainWindow()
>
> {
>
> delete ui;
>
> }
>
> void MainWindow::create_tables()
>
> {
>
> query.exec("create table employee(id int primary key, name varchar(20),
> city int, country int)");
>
> query.exec("insert into employee values(1, 'Espen', 5000, 47)");
>
> query.exec("insert into employee values(2, 'Harald', 80000, 49)");
>
> query.exec("insert into employee values(3, 'Sam', 100, 1)");
>
> }
>
> void MainWindow::on_pushButton_clicked()
>
> {
>
> bool ok;
>
> QStringList ongo;
>
> QString text = QInputDialog::getText(this,"MaxxTel","Enter Buddy
> name(Eg:john)",QLineEdit::Normal,"",&ok);;
>
> if (ok && !text.isEmpty())
>
> {
>
> yuvaraj =text.split(",");
>
> }
>
>
> query.exec("insert into employee values('4', 'OngoBiz','100000','50')");
>
> QSqlQuery query("SELECT * FROM employee");
>
> QSqlRecord rec = query.record();
>
> int a = rec.indexOf("name");
>
> while(query.next())
>
> {
>
> qDebug() << query.value(a).toString();
>
> }
>
> }
>
>
>
> why once we close application and again relogin means,it is not displaying
> previously stored details.
>
>
> Please help me
>
>
>
>
> Thanks
>
>
> Yuvaraj R
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
Prem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090924/520c705f/attachment.html
More information about the Qt-interest-old
mailing list