21
This commit is contained in:
11
Eclipse-Workspace/prg3_b2_38/.classpath
Normal file
11
Eclipse-Workspace/prg3_b2_38/.classpath
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Admin/Downloads/mysql-connector-j-9.6.0/mysql-connector-j-9.6.0/mysql-connector-j-9.6.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
1
Eclipse-Workspace/prg3_b2_38/.gitignore
vendored
Normal file
1
Eclipse-Workspace/prg3_b2_38/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/bin/
|
||||
17
Eclipse-Workspace/prg3_b2_38/.project
Normal file
17
Eclipse-Workspace/prg3_b2_38/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>prg3_b2_38</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=21
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=21
|
||||
20
Eclipse-Workspace/prg3_b2_38/src/in/test/deletedemo.java
Normal file
20
Eclipse-Workspace/prg3_b2_38/src/in/test/deletedemo.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package in.test;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.Statement;
|
||||
public class deletedemo {
|
||||
public static void main(String[] args) throws Exception{
|
||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jdbc_B2_38", "root", "12345");
|
||||
Statement ps = con.createStatement();
|
||||
int i = ps.executeUpdate("delete from student where Rollno=103");
|
||||
if(i>0) {
|
||||
System.out.println("success");
|
||||
}
|
||||
else {
|
||||
System.out.println("fail");
|
||||
}
|
||||
con.close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
19. write a java code to implement jdbc connectivity to insert records into tables to demonstrate PreparedStatement.
|
||||
20. write a java code to implelment jdbc connectivity to insert records into the tables using positional parameter
|
||||
21. write a java code to implement jdbc connectivity to delete records from table to demonstrate Statement.
|
||||
|
||||
Reference in New Issue
Block a user