karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 119 of 143

Link Control Protocol (LCP)

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 6K+ Views

Link Control Protocol (LCP) is a part of Point – to – Point Protocol (PPP) that operates in the data link layer. It is responsible for establishing, configuring, testing, maintaining and terminating links for transmission. It also imparts negotiation for set up of options and use of features by the two endpoints of the links.Working PrincipleWhen PPP tries to communicate, it sends out LCP packets prior to the establishment of connections over the point – to – point link. The LCP packets check the communication line to ascertain whether it can sustain the data volume at the required speed. Accordingly, ...

Read More

How to change MySQL error message language?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 275 Views

You can use lc_messages to change MySQL error message language. The syntax is as follows −SET lc_messages = 'yourLanguage';To understand the concept, let us create a table with some error and check the error message language.Here, we have set the local message to French. Let us first create a table −mysql> create table errorMessagelanguage    -> (    -> Error_MessageId int,    -> Error_Message varchar(100),    -> );The error message is as follows −ERROR 1064 (42000): Erreur de syntaxe près de ')' à la ligne 5Now you can set the error message to be in English language. The query is ...

Read More

Which library can be used to interact with database in JSP?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 240 Views

The JSTL SQL tag library provides tags for interacting with relational databases (RDBMSs) such as Oracle, MySQL, or Microsoft SQL Server.Following is the syntax to include JSTL SQL library in your JSP −Following table lists out the SQL JSTL Tags −S.No.Tag & Description1Creates a simple DataSource suitable only for prototyping2Executes the SQL query defined in its body or through the sql attribute.3Executes the SQL update defined in its body or through the sql attribute.4Sets a parameter in an SQL statement to the specified value.5Sets a parameter in an SQL statement to the specified java.util.Date value.6Provides nested database action elements with ...

Read More

Return null for date_format when input is null in MySQL?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 715 Views

Use IF() function to return null for date_format when input is null in MySQL. The syntax is as follows −SELECT IF(yourDateColumnName, date_format(yourDateColumnName, '%d/%m/%Y'), NULL) FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table returnNullWhenInputIsNullDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ShippingDate datetime    -> ); Query OK, 0 rows affected (1.21 sec)Now you can insert some records in the table using insert command. The query is as follows −mysql> insert into returnNullWhenInputIsNullDemo(ShippingDate) values('2019-01-21'); Query OK, 1 row affected ...

Read More

Verify that MySQL SET FOREIGN KEY CHECKS is set to = 1?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 975 Views

You can verify SET FOREIGN KEY CHECKS is set to = 1 or not with the help of variable@@foreign_key_checks;The syntax is as follows −select @@foreign_key_checks;You can use SHOW VARIABLES command. The syntax is as follows −show variables like 'foreign%';Now you can implement both the syntaxes.Case 1 − Using variable @@foreign_key_checks.The query is as follows −mysql> SELECT @@foreign_key_checks; Here is the output −+----------------------+ | @@foreign_key_checks | +----------------------+ | 1 | +----------------------+ 1 row in set (0.00 sec)Case 2 − Using SHOW commandThe ...

Read More

What happens when buffer is set to a value "none" in JSP?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 253 Views

The buffer attribute specifies the buffering characteristics for the server output response object.You may code value of "none" to specify no buffering so that the servlet output is immediately directed to the response object or you may code a maximum buffer size in kilobytes, which directs the servlet to write to the buffer before writing to the response object.To direct the servlet to write the output directly to the response output object, use the following −

Read More

Get the date/time of the last change to a MySQL database?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 1K+ Views

You can get the date/time of the last change to a MySQL database with the help of INFORMATION_SCHEMA.TABLES. The syntax is as follows −SELECT update_time FROM information_schema.tables WHERE table_schema = 'yourDatabaseName’' AND table_name = 'yourTableName’;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table TblUpdate    -> (    -> Id int not null auto_increment primary key,    -> Name varchar(20)    -> ); Query OK, 0 rows affected (0.49 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into TblUpdate(Name) ...

Read More

What is contentType attribute in JSP?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 4K+ Views

The contentType attribute sets the character encoding for the JSP page and for the generated response page. The default content type is text/html, which is the standard content type for HTML pages.If you want to write out XML from your JSP, use the following page directive −The following statement directs the browser to render the generated page as HTML −The following directive sets the content type as a Microsoft Word document −You can also specify the character encoding for the response. For example, if you wanted to specify that the resulting page that is returned to the browser uses ISO ...

Read More

MySQL DateTime Now()+5 days/hours/minutes/seconds?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 648 Views

To update the current date and time to 5 days, you need to use the Now() + 5. That would update the entire date-time i.e. days, hour, minutes and seconds. To understand this, let us create a table. The query to create a table is as follows −mysql> create table UserInformationExpire    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> UserName varchar(10),    -> UserInformationExpireDateTime datetime not null    -> ); Query OK, 0 rows affected (0.83 sec)Now you can insert some records in the table using insert command. The query is as follows −mysql> ...

Read More

How to group queries using transaction in a JSP?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 327 Views

The tag is used to group the and tags into transactions. You can put as many and tags as statements inside the tag to create a single transaction.It ensures that the database modifications performed by the nested actions are either committed or rolled back if an exception is thrown by any nested action.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultdataSourceDatabase connection to use (overrides the default)NoDefault databaseisolationTransaction isolation (READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, or SERIALIZABLE)NoDatabase’s defaultExampleTo start with the basic concept, let us create a Students table in the TEST database and create a few records ...

Read More
Showing 1181–1190 of 1,421 articles
« Prev 1 117 118 119 120 121 143 Next »
Advertisements