in my JS file I need to do a search on the DB (select * from table where condition) and store the result in an array(multidimensional) do you have an idea how to do it ? thank you in advance
-
check this link--stackoverflow.com/questions/13899650/…Animesh– Animesh2014-04-30 08:16:28 +00:00Commented Apr 30, 2014 at 8:16
-
1Write SQL in a Javascript is bad idea. You should use Ajax to send data to server. Then server file will execute the appropriate SQL. Then Server file will response your output.Sajitha Rathnayake– Sajitha Rathnayake2014-04-30 09:17:33 +00:00Commented Apr 30, 2014 at 9:17
Add a comment
|
2 Answers
Don't write any code in your JavaScript related to Database.
In Smart GWT always access database using DataSource
You can use GWT JSNI to call Java method from JavaScript and vice-verse.
Find a sample code on Calling GWT Java function from JavaScript
1 Comment
Braj
I never suggest you to use it but still you can look at Is it possible to retrieve data from SQL Server using jQuery?