LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2005, 09:06 AM   #1
unimatrix
LQ Newbie
 
Registered: Feb 2005
Posts: 1

Rep: Reputation: 0
SQLITE driver for QT does not load


As the topic says, i can't get SQLITE drivers to work.

I'm currently running Suse 9.2 with QT 3.3.3.
I have installed the qt-sqlite driver under /usr/lib/qt3/plugins/sqldrivers.
This driver seems to work fine under the QT Designer when trying to establish a database connection, but when I run my prog it comes up with:

QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: QSQLITE

The contents of main.cpp is just a simple database connection, as I was just testing
and trying to grasp database concepts under QT

Code:
int main( int argc, char ** argv )
{
	QApplication a( argc, argv );
	QSqlDatabase *db=QSqlDatabase::addDatabase("QSQLITE");
	Form1 w;
	bool dbconnect;
	
	db->driver("QSQLITE");
	db->setDatabaseName("/home/lw/Desktop/SQL/adress.db");
	
	if(!db->open())
	{
		db->lastError().showMessage();
		dbconnect=false;
	}
	else {dbconnect=true;}

	w.show();
	a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
	
	return a.exec();
}
Now I have been searching around for this problem and on Trolltech's Site
doc.trolltech.com/3.3/sql-driver.html
the section for SQLITE mentions the parameters "-plugin-sql-sqlite" and "-qt-sql-sqlite" for some configure-file!? Also at the start of that page there is mention of a configure command. I have tried running "configure" or "./configure" but my system doesn't know what it is.

I'm not to clued up with the linux environment, so if anybody can point me in the right direction or post the right "configure"-command with the all the necessary parameters I would be very thankfull.

PS: Does this even solve my problem? Or is it something else?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sqlite output Liakoni Linux - Software 1 10-07-2005 05:57 AM
installing sqlite under cyqwin Dave31836 Programming 1 02-24-2005 06:55 PM
SQLite database backup ddpicard Linux - Software 2 11-01-2004 06:54 PM
sqlite and bash verstapp Linux - General 0 08-07-2004 05:49 AM
Cannot load driver Travers Linux - Hardware 0 07-22-2004 02:36 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration