FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveTouch SqlLite OR MySql
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
SqlLite OR MySql
Posted: Wed Sep 19, 2018 01:25 AM

Hi Ant么nio,

I would like to develop an app that can work with these two databases. Do you know if is possible to use both with the same code? only changing the initial connection?
I'm not intended use both at the same time, but some users want or need SqlLite and other choose to use Mysql.

Is it possible ? how?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 05:50 AM

Vilian,

Do you mean using FiveTouch or FWH ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 10:44 AM

Fivetouch.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 10:46 AM

Vilian,

You have to use a Web service so you can manage any database engine :-)

viewtopic.php?f=33t=31621start=0

&&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 10:56 AM

Ant么nio,
Do I must to do the server of webservice?
I was thinking that SqlLite is the internal database of Android, isn't it ? How to do a webservice for it?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 11:11 AM
QT provides support for SqlLite (FiveTouch uses QT):

https://katecpp.wordpress.com/2015/08/28/sqlite-with-qt/
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 11:29 AM

But Can I use the same way to use MySql ?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SqlLite OR MySql
Posted: Wed Sep 19, 2018 01:06 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Wed Oct 17, 2018 08:50 PM
Ant么nio,

I believe it's that I want, but I don't how to use this code in Fivetouch ! I have tried by this way, but don't worked !
#include "FiveTouch.ch"

function Main()
LOCAL oBD

oDB := QSqlDatabase()
oDB:addDatabase("QMYSQL")
oDB:setHostName("10.10.1.1")
oDB:setDatabaseName("fox_sgv")
oDB:setUserName("root")
oDB:setPassword("Xxxx")
oDB:open()

RETURN NIL


But, when I try run the app, is shown a message of Undefined Function QSQLDATABASE. Could you help me ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: SqlLite OR MySql
Posted: Fri Oct 19, 2018 04:23 PM
Your code is correct, but


Para que este c贸digo compile bien, es necesario que se a帽ada el m贸dulo sql al proyecto, es decir al fichero *.pro con la linea:

QT+=sql

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Fri Oct 19, 2018 06:53 PM

In my directory of Fivetouch there are no files *.pro :(

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: SqlLite OR MySql
Posted: Fri Oct 19, 2018 09:48 PM

You do not have/use the project fivetouch.pro?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Fri Oct 19, 2018 10:06 PM
No,
I'm using Fivetouch Version that Ant么nio has published here http://forums.fivetechsupport.com/viewtopic.php?f=32&t=35529
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: SqlLite OR MySql
Posted: Sat Oct 20, 2018 01:10 AM
vilian wrote:No,
I'm using Fivetouch Version that Ant么nio has published here http://forums.fivetechsupport.com/viewtopic.php?f=32&t=35529


Folder Windows, not?
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: SqlLite OR MySql
Posted: Sat Oct 20, 2018 02:24 PM
This is evertyhing I have in Fivetouch directory:
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Bel茅m-Pa-Brazil