Insert Record in a MySQL Table with Java

AmitDiwan
Updated on 17-Feb-2020 06:56:12

827 Views

Let us first create a table. Following is the query to create a table in MySQL −mysql> create table DemoTable(    Id int,    Name varchar(30),    CountryName varchar(30),    Age int ); Query OK, 0 rows affected (0.66 sec)Following is the Java code to access MySQL database −import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; public class AccessMySQLDatabase {    public static void main(String[] args) {       Connection con = null;       Statement st = null;       try {          con = DriverManager.getConnection("jdbc :mysql ://localhost :3306/web?" + "useSSL=false", "root", "123456"); ... Read More

How jQuery getJSON Method Loads JSON Data

Amit D
Updated on 17-Feb-2020 06:54:47

695 Views

The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Let’s say we have the following JSON content in result.json file −{   "name": "David",   "age" : "25",   "sex": "male" }The following is a code snippet showing the usage of ... Read More

Retrieve Data from JSON File using jQuery and Ajax

Amit D
Updated on 17-Feb-2020 06:53:11

7K+ Views

To retrieve data from JSON file using jQuery and Ajax, use the jQuery.getJSON( url, [data], [callback] )The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Let’s say we have the following JSON content in result.json file −{ "name": "John", "age" : ... Read More

Load JSON Data Using jQuery

Amit D
Updated on 17-Feb-2020 06:51:09

18K+ Views

To load JSON data using jQuery, use the getJSON() and ajax() method. The jQuery.getJSON( ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Add your JSON content in result.json file −{ "name": "Amit", "age" : "27", "sex": "male" }The following is a code snippet showing the ... Read More

Difference between Internal Tables, Structures, or Work Areas in SAP ABAP

Sharon Christine
Updated on 17-Feb-2020 06:48:21

7K+ Views

Internal tables − Internal tables are a means of storing data in the fixed format in working memory of ABAP. The data is stored line by line. So it is necessary for the data to be in a fixed format. Generally, they are used to store data in database tables to be used in ABAP programs.Structures−  Structures are basically data objects consisting of various components or fields of any data types. It differs from the tables in a way that it simulates the format of the table and is used to hold one row of data whereas table has multiple rows ... Read More

Find Source Code of a Transaction in SAP

Lakshmi Srinivas
Updated on 17-Feb-2020 06:47:01

4K+ Views

First, go to System → Status to find the program name. Now use the transaction SE38 or SE80 to view the source code.Alternatively, you can activate the debugging mode before running your transaction by keying in /h.

Use of Custom Extractor in SAP R/3 System

Monica Mona
Updated on 17-Feb-2020 06:10:15

395 Views

In order to extract data from tables, you need to follow steps:Create a View of the required table from where the data needs to be extracted or view over multiple joined tablesNavigate to Transaction SE11 and Select option 'View'. It will ask for a name, name it something like 'View_TableName'.Select which all the fields of the tables needs to be extracted and click on activateGo to Transaction RS02 and create a transaction extractor and name it something like 'Trans_TableName'Specify the position of the created extractor in the component hierarchy.If you want to provide descriptions, add it. Specify the view name ... Read More

How MySQL Can Perform Case-Sensitive String Comparison

Ankith Reddy
Updated on 17-Feb-2020 06:01:43

678 Views

As we know that MySQL is not case-sensitive while comparing characters but it can be changed i.e. MySQL can perform case-sensitive string comparison if we will use BINARY keyword before the expression. Actually, BINARY keyword instructs MySQL to compare the characters in the string using their underlying ASCII values rather than just their letters. It can be illustrated with the following example from table ‘Employee’ having the following data −mysql> Select * from Employee; +----+--------+--------+ | ID | Name   | Salary | +----+--------+--------+ | 1  | Gaurav | 50000  | | 2  | Rahul  | 20000  | | 3 ... Read More

Difference Between on, live, and bind in jQuery

Amit D
Updated on 17-Feb-2020 06:01:22

400 Views

jQuery on() methodThe on( events [, selector ] [, data ], handler ) method binds a handler to an event (like click) for all current − and future − matched element. It can also bind custom events.Here is the description of all the parameters used by this method −events − Event types separated by spaces.selector − A Selector Stringdata − Data to be passed to the event handler in event.datahandler − A function to bind to the event on each of the set of matched elementsExampleYou can try to run the following code to learn how to work with on() method − ... Read More

Disable a Particular jQuery Event on a Page

Amit D
Updated on 17-Feb-2020 05:54:34

610 Views

To disable a particular jQuery event, use the jQuery off() method. You can try to run the following code to learn how to disable a particular jQuery event on a page −ExampleLive Demo $(document).ready(function(){     $("p").on("click", function(){         alert("You clicked it!");     });     $("button").click(function(){         $("p").off("click");     }); }); Click me Click above to generate an alert box. Click the below button to remove namespace, which won’t generate an alert box. Remove Event

Advertisements