tag:blogger.com,1999:blog-31018968.post8915933612926723477..comments2023-07-06T14:20:18.129+05:00Comments on Saifuddin's | Blog: Use SQL Adapter in IBM Worklight 5.0.xSaifuddinhttp://www.blogger.com/profile/11699695360501282986noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-31018968.post-22981630238370552732014-05-15T20:22:39.080+05:002014-05-15T20:22:39.080+05:00Thanks for a quick reply.
hope i can get another ...Thanks for a quick reply.<br /><br />hope i can get another example of inserting and retrieving images from database using sql/http adapter from Worklight application :)Srikanthhttps://www.blogger.com/profile/12783403635404796511noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-80975817591574764942014-05-15T19:50:20.879+05:002014-05-15T19:50:20.879+05:00Thanks for your feedback Enjamoori.
Sure, I'l...Thanks for your feedback Enjamoori.<br /><br />Sure, I'll share whenever I get a chance :)Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-65801768224257861502014-05-15T19:07:33.582+05:002014-05-15T19:07:33.582+05:00Hello Sir,
Could you please post another one about...Hello Sir,<br />Could you please post another one about <br />How to insert and retrieve photos into database using sql/http adapter through worklight application.<br /><br />Nowhere i found about this topic.<br /><br />This might be helpful to many learners.Srikanthhttps://www.blogger.com/profile/12783403635404796511noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-65290375435034323702014-05-15T19:05:50.867+05:002014-05-15T19:05:50.867+05:00This comment has been removed by the author.Srikanthhttps://www.blogger.com/profile/12783403635404796511noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-67069309324461246072014-05-15T18:51:07.387+05:002014-05-15T18:51:07.387+05:00This comment has been removed by the author.Srikanthhttps://www.blogger.com/profile/12783403635404796511noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-66456424829009628302014-03-18T22:26:41.455+05:002014-03-18T22:26:41.455+05:00a very relevant tutorial bhaijan.
keep up the good...a very relevant tutorial bhaijan.<br />keep up the good work.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-31018968.post-38600038623981062402014-03-17T15:49:40.073+05:002014-03-17T15:49:40.073+05:00Hi Veeresh gadag,
procedure : 'addJsonadapter...Hi Veeresh gadag,<br /><br />procedure : 'addJsonadapters' // line<br />Procedure name you're calling is not exist, remove the 's' character in "addJsonadapters" would make it work. <br /><br />hope it helps.Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-21969280408027517892014-03-16T16:25:51.564+05:002014-03-16T16:25:51.564+05:00I am a beginner please help me.
i want to insert n...I am a beginner please help me.<br />i want to insert name,usn to stud table which are read from text input feilds(named p1 and p2)<br /><br />//code in common folder js file<br /><br />function addSQLRecords(){ //i have linked this function to the submit button<br /> var invocationData = {<br /> adapter : 'jsonadapter',<br /> procedure : 'addJsonadapters',<br /> parameters : [p1,p2]<br /> };<br /> <br /> WL.Client.invokeProcedure(invocationData,{<br /> onSuccess : addSQLQueerySuccess,<br /> onFailure : addSQLQueeryFailure<br /> });<br />}<br /> <br />function adddSQLQueerySuccess(){<br /> WL.Logger.debug("insert success");<br /> <br />}<br /> <br />function loadSQLQueeryFailure(result){<br /> WL.Logger.error("insert failure");<br />}<br /><br />//code in sql adapter js file<br /><br /><br />var addStatement = WL.Server.createSQLStatement("insert into stud (name, usn) values (?,?)");<br /><br />function addJsonadapter(p1,p2) {<br /> <br /> return WL.Server.invokeSQLStatement({<br /> preparedStatement : addStatement,<br /> parameters : [p1,p2]<br /> });<br />}<br /><br /><br />this code is not working what do i have to change to make it insert data into the table?<br />Anonymoushttps://www.blogger.com/profile/14837410896195495907noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-91108448449432281252014-02-19T19:10:59.516+05:002014-02-19T19:10:59.516+05:00yeah sir. but i want to solution for how give the ...yeah sir. but i want to solution for how give the value in html text field then that value stored in mysql database. that is my solution.<br /><br />i have to check it insert query<br /><br />var insertProductStatment = WL.Server<br /> .createSQLStatement("insert into products (productName, Qty, Model, price) values ('sony ipad','10','high','5000')");<br /><br />function addProduct() {<br /><br /> return WL.Server.invokeSQLStatement({<br /> preparedStatement : insertProductStatment,<br /> parameters : [ ]<br /> });<br />}<br /><br /><br />this code is worked. but i need insert to html-xml-js-mysql<br />Anonymoushttps://www.blogger.com/profile/01993204610707798324noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-60760686836187095432014-02-19T17:55:00.507+05:002014-02-19T17:55:00.507+05:00Sorry, I didn't get what you mean but things y...Sorry, I didn't get what you mean but things you're looking for are very straight forward the addProduct function defined in adapter js file using INSERT query, while addProductRec function is defined under the common folder .js file which use to call this procedure.<br /><br />Hope it helps.Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-23010535186601680842014-02-19T17:12:52.567+05:002014-02-19T17:12:52.567+05:00Hi muhammad. i've receive your code.
i work th...Hi muhammad. i've receive your code.<br />i work that code.that code is runing but this code for "select " query only. but i need insert code. i will check the insert coding it's work but i have to use html text productname,qty ,model,price it's does not get the value in .js.Anonymoushttps://www.blogger.com/profile/01993204610707798324noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-8052091717598412782014-02-19T16:20:21.107+05:002014-02-19T16:20:21.107+05:00Hi Tema,
Please download the code from given dow...Hi Tema, <br /><br />Please download the code from given download code url in the same.<br /><br /><br /><br />Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-42794297274396425732014-02-19T00:08:23.459+05:002014-02-19T00:08:23.459+05:00please tell me. how to insert the value in mysql u...please tell me. how to insert the value in mysql using eclipse kepler worklight.<br /><br />i've doing simple hybrid android worklight application. i done a select *from database is successfuly runed but insert query is not inserted. please help me.Anonymoushttps://www.blogger.com/profile/01993204610707798324noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-49430105193200674762014-02-19T00:07:28.313+05:002014-02-19T00:07:28.313+05:00please tell me. how to insert the value in mysql u...please tell me. how to insert the value in mysql using eclipse kepler worklight.<br /><br />i've doing simple hybrid android worklight application. i done a select *from database is successfuly runed but insert query is not inserted. please help me.Anonymoushttps://www.blogger.com/profile/01993204610707798324noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-35685189009604495102014-01-15T15:56:35.915+05:002014-01-15T15:56:35.915+05:00Hi Anish,
I believe this already been covered in ...Hi Anish,<br /><br />I believe this already been covered in this blog entry, why not just give it a try :), you can also download this example code in the mentioned url. Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-2892499789253923132014-01-15T11:00:20.414+05:002014-01-15T11:00:20.414+05:00hi
i need simple example to store data using sqlad...hi<br />i need simple example to store data using sqladaptor in mysql (no checks no security simple code). <br /><br />anishhttps://www.blogger.com/profile/01291562878881457980noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-20398189373470627172014-01-02T23:04:42.514+05:002014-01-02T23:04:42.514+05:00Hi Srikanth,
Thanks for your feedback, I am glad ...Hi Srikanth,<br /><br />Thanks for your feedback, I am glad this tutorial helps.<br /><br />@Arun<br />Firstly, sorry for late reply, but I never encounter this issue and it might appear when application unable to connect server mostly when the default ip is used instead of System IP or Server IP in application-descriptor.xml.<br /><br />hope it helps.<br /><br />Thanks,Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-6448844154437001302014-01-02T21:47:18.866+05:002014-01-02T21:47:18.866+05:00Thanks ....thanks...
thanks a lot bro..
I cant ex...<b>Thanks ....thanks...<br />thanks a lot bro..</b><br /><br /><i>I cant explain in my words....</i><br />u helped me a lot.. <br />once again<br />thanking you... <b> _/\_ </b>Srikanthnoreply@blogger.comtag:blogger.com,1999:blog-31018968.post-28231770407316883102013-12-14T23:46:41.038+05:002013-12-14T23:46:41.038+05:00hi thnks 4r these useful tutorial..
while i run t...hi thnks 4r these useful tutorial..<br /><br />while i run these application on mobilesimulator it says that "loading please wait.." and take more time. is't anyother problem or config needed.<br /><br />thanks in advanceArunhttps://www.blogger.com/profile/08213627174335452949noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-33190007883401048762013-10-11T16:13:35.692+05:002013-10-11T16:13:35.692+05:00Kindly help me with the source code and procedure....Kindly help me with the source code and procedure.....Dollar sharmanoreply@blogger.comtag:blogger.com,1999:blog-31018968.post-24695107744984690392013-10-08T15:49:34.513+05:002013-10-08T15:49:34.513+05:00Hi Dollar Sharma,
Please check my previous commen...Hi Dollar Sharma,<br /><br />Please check my previous comment reply to @Samsul, in the same.<br /><br />hope it helps.Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-37186028915768938432013-10-07T10:38:44.154+05:002013-10-07T10:38:44.154+05:00Hi i want to authenticate login page with mysql .....Hi i want to authenticate login page with mysql ....kindly help me in that...i will be thankful<br />Dollar sharmanoreply@blogger.comtag:blogger.com,1999:blog-31018968.post-7708971361324668902013-09-16T15:04:30.372+05:002013-09-16T15:04:30.372+05:00Hi Anonymous,
Worklight SQL adapter does not supp...Hi Anonymous,<br /><br />Worklight SQL adapter does not support out parameters. <a href="http://stackoverflow.com/a/18042135/388053" rel="nofollow">[Reference]</a>.<br /><br />hope if helps.<br />Saifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.comtag:blogger.com,1999:blog-31018968.post-41925344186058113282013-09-14T10:41:55.895+05:002013-09-14T10:41:55.895+05:00in mySQL you write select statement inside procedu...in mySQL you write select statement inside procedure but in oracle you cannot write you need either result set or OUT parameter to get these values.<br />We have a oracle DataBase stored procedure which returns a value. This value could be an out parameter or a result set . We are trying to call this oracle stored procedure through Work light SQL Adapter by using (WL.Server.invokeSQLStoredProcedure) and getting this error<br />“FWLSE0101E: Cause by : HelloWorklightProjectjava.sql.SQLException: ORA-06550:line 1, PLS-00221: it is not a procedure or not defined….”<br /> <br />If we do not return any value and execute same procedure it works fine which means that on oracle side there is no issue of procedure.<br />If we call a oracle function and return a value not result set through (WL.Server.createSQLStatement, WL.Server.invokeSQLStatement) there is no Issue.<br />--------<br /><br /><br />Im stuck with this will appreciate if you can help me ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-31018968.post-83998120498356723822013-09-09T17:26:49.473+05:002013-09-09T17:26:49.473+05:00Hi Anonymous,
Thanks for your feedback!
To invok...Hi Anonymous,<br /><br />Thanks for your feedback!<br /><br />To invoke stored procedure there is method defined <a href="http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m5/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fapiref%2Fr_method_wl_server_invokesqlstor.html" rel="nofollow">WL.Server.invokeSQLStoredProcedure</a> accept json block of parameters.<br /><br />if you are following the same example just add procedure in mySQL.<br /><br />DELIMITER $$<br />CREATE PROCEDURE `getAllProducts`()<br />BEGIN<br />SELECT * FROM test.product;<br />END<br /><br />then add procedure entry in adapter Product.xml and use the below line of code in Product-impl.js.<br /><br />function getAllProducts(){<br /> <br /> return WL.Server.invokeSQLStoredProcedure({<br /> procedure : "getAllProducts",<br /> parameters : []<br /> });<br />}<br /><br />Now Deploy worklight adapter and then invoke Worklight procedure with eclipse IDE.<br /><br />Deploy Steps: Right click on adatper name Run As-> Deploy Worklight adapter<br />Invoke Steps: Right click on adatper name Run As-> invoke Worklight procedureSaifuddinhttps://www.blogger.com/profile/11699695360501282986noreply@blogger.com