Category : Databases

Email Have you ever been troubleshooting a problem with remote SQL Iproxy MP, remote DB, etc) and wanted to test to see if the local system account (or any account for that matter) could make a remote connection to SQL but you didn’t want to install the SQL tools just to make that test?  Seems ..

Read more

EmailException in thread “main” org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [beans.HEmployee#0] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:137) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:209) at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:194) at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90) at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:715) at org.hibernate.internal.SessionImpl.save(SessionImpl.java:707) at org.hibernate.internal.SessionImpl.save(SessionImpl.java:702) at test.Client.main(Clien..

Read more

Email Design the HTML Page PDF  exple: like <page style=”font-size: 14px”><div style=”height: 1000px”> <table width=”100%” align=”center” cellpadding=”0″ cellspacing=”0″ style=”padding: 0 ;margin: 0; “> <tr valign=”top”> <td width=”100%”><img src=”res/images/mts_main.jpg” alt=”” style=”width:100%;height: 624px;display: block” /> </td> </tr> <tr> <td style=”height:75px;width:100%;background-color:rgb(247, 150, 71); “> </td> </tr> </table> </div> </page> Php using Fetching the all html page exple: $pageContent_as ..

Read more

Email$sql = “Select Count(auto_id) as no_of_invoice_requestfromwork_order_invoice_requestwherestatus=’Request Raised'”;$result = getResult($sql); while($row = mysqli_fetch_assoc($result)){$no_of_invoice_request = $row[‘no_of_invoice_request’];}return $no_of_invoic..

Read more

Email  install MySql Workbench- community install eclipse create project   4.package dbeooglo; import java.sql.Connection;import java.sql.DriverManager; public class dbconect { public static void main(String arg[]) {Connection conn = null;try {conn = (Connection)DriverManager.getConnection(“jdbc:mysql://localhost:3306/loginserss”,”root”,””); if(conn !=null){System.out.print(“connection”);} }catch(Exception e){System.out.print(“Not connected”);} } } 5. create dat..

Read more

Email MySQL connection diver  Link  https://dev.mysql.com/downloads/file/?id=480288   import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.*; import java.sql.SQLException; import javax.sql.*; public class dbconect { static Connection conncetion = null; static String databaseName = “”; static String url =”jdbc:mysql://localhost:3306/” +databaseName; static String username =”root”; static String password =”root”; public static void main(String[] arg) throws InstantiationException, IllegalAccessException, ClassNotFoundException,SQLException { Class.forName(“com.mysql.jdbc.Dirver”); ..

Read more

Email mysql -u root -p Enter password: user mysql SELECT User, Host, plugin FROM mysql.user; +——+———–+————-+ | User | Host | plugin | +——+———–+————-+ | root | localhost | unix_socket | +——+———–+————-+ 1 row in set (0.00 sec) UPDATE user SET plugin=’mysql_native_password’ WHERE User=’root’; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: ..

Read more