Hello to all I need a suggestion or tips. I have to develop an application with WdMobile to run on Android o.s. This application must connect the tablet to an external MySql database over the web and it must handle an agenda with few fields.. Do you suggest to use the SqlManager php scripts to connect to the db? Other ideas? Some example? Thanks in advance. Dirk
Hi. You can connect trough this code. ConnectionNum is int ConnectionNum = SQLConnect("192.168.1.100", "user", "password", "DatabaseName", "MySQL") IF ConnectionNum <> 0 THEN ToastDisplay("Connection Successfully") ELSE SQLInfo() Error("Connection has failed !" + CR + ... "Error code: " + SQL.Error + CR + SQL.MesError) END SQLDisconnect()
Hi Jackson Thanks for the info, but i already use this kind of connection with the database. We are speaking of windev mobile not about windev. In the past years i have used an external .net component in a program developed in Visual c# to connect to a database in a wireless lan, because windev mobile didn't use .net component or in those years (v18) it didn't have a direct connection to MySql db type like windev has. Thanks anyway. Dirk
Hi DirkPitt I know we are speaking about windev mobile. Believe me or not I use this to connect into PostgreSQL from windev mobile IOS application, but from emulator on windows PC. I still try to find the way to use it from MAC or Iphone because .Dll can not be used from MacOS or IOS. So, I have same problem with IOS and PostgreSql on Wx24. If I find some way , I think it is same for all external / native not supported databases, I will send you informations. Best regards !
Bonjour tout le monde. @Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens! These two videos will help you. I tried them and its OK for me. 1- Web Services ( Partie 1 ) 2- Web Services ( Partie 2 ) Bon Dev
Hi, Connecting to a DB from outside is not recommended. If, whatever, you are sure to use this way, look about "Remote MySql".
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens! Thank you for the videos. Dirk
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens! Thank you. This is great video. I watch also this video, which is also good, but webdev23 generate REST webservice with some errors in code so I have to fix it from this video and it won't work in ReadAll function.
hello i do this since 2001 !! with android and IOS on MySQL, SQLServer, Firebird , Oracle ....... and the base is not directly aviable from external , but wih a webservice in php look here : Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens! and you can have a maximum security with https for contacting the webservice, but in http all request a crypted and response too if you want best Reards
Hello again. I have another problem. If I insert image with PgAdmin (postgresql) or Php4Admin (MySQL) I can see it from Looper Control on windev mobile. IF I try to save image from mobile application I see blob but can not see picture . My code for insert: clMojUser is MUSERS clMojUser.m_sLogin = UnicodeToAnsi(EDT_Login) clMojUser.m_sName = UnicodeToAnsi(EDT_Name) clMojUser.m_sMdp = UnicodeToAnsi(EDT_Password) clMojUser.m_Photo = Crypt(IMG_Photo,"",cryptNone,encodeBASE64) //Method 2 || We will use Method 2 //ScreenToFile(MyWindow, "gclMojUser") sJSON is ANSI string = "" Serialize(clMojUser,sJSON,psdJSON) //We serialize our data //We contact the webservice via http requests at the rest //We need to specify the method, so we will use the variable httprequest //HTTPCreateForm("RESGITRATION") //HTTPRequest(gsAPIUrl + "users/new", "", "", sJSON, "application/json", "", "") MojReq is httpRequest MojReq..URL = gsAPIUrl +"users/new" MojReq.Method = httpPost MojReq..ContentType = "application/json" MojReq..Content = sJSON MojRep is httpResponse = HTTPSend(MojReq) My code for read record and display it in looper: maReq is httpRequest maRep is httpResponse vRestVariant est un Variant maReq.URL=gsAPIUrl+"USERS" maReq..Method = httpGet maRep=HTTPSend(maReq) SI ErreurDétectée ALORS Erreur(ErreurInfo(errComplet)) SINON vRestVariant=JSONVersVariant(maRep.Content) LooperDeleteAll(LOOP_Users) FOR ALL ss OF vRestVariant LooperAddLine(LOOP_Users,ss.name,ss.login,ss.mdp,ss.IDUSERS,Uncrypt(ss.photo,"",cryptNone,encodeBASE64)) //Ako ima foto, onda //Uncrypt(ss.photo,"",cryptNone,encodeBASE64)) FIN FIN LooperDisplay(LOOP_Users,taStart) Please correct me. Thank you.