Results 1 to 4 of 4

Thread: How to access remote Database?

  1. #1
    Join Date
    Feb 2011
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to access remote Database?

    Dear All,
    I've to access a Sqlite DB which is running at some other system. I've some doubt on this.

    1. A database is created at a server end.
    2. How to connect to that remote DB?
    3. Do i need to pass IP along with datbase name And password to access that DB?

    Thank you all.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to access remote Database?

    SQLite doesn't have a notion of server thus you can't connect to a remote SQLite database unless you can access the database file directly (via a network share or remote filesystem).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2011
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to access remote Database?

    Quote Originally Posted by wysota View Post
    SQLite doesn't have a notion of server thus you can't connect to a remote SQLite database unless you can access the database file directly (via a network share or remote filesystem).
    Thank you very much wysota for this reply. Actually I'm new to DB and from my understanding...
    In document it is mention taht QSqlDatabase represents a connection to a database. and in QSqlDatabase v can pass QSQLITE as an argument to interact an sqlite database QSqlDatabase::QSqlDatabase ( const QString & type ) http://doc.qt.nokia.com/latest/qsqldatabase.html#QSqlDatabase-2 .

    Cannt we use like mentioned in the Qt help manual?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to access remote Database?

    SQLite is a local database engine operating directly on files. If you don't have access to the file, you can't access the database. With or without QSqlDatabase.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. can qt access remote database?
    By stmk in forum Newbie
    Replies: 5
    Last Post: 5th November 2012, 17:52
  2. Replies: 3
    Last Post: 8th March 2011, 07:57
  3. Questions about connect to remote database
    By stmk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2010, 10:02
  4. Remote Device Access
    By Guilo in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 14th June 2010, 15:33
  5. Problem connecting to remote database
    By graciano in forum Qt Programming
    Replies: 2
    Last Post: 16th April 2009, 10:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.