1. Relieve database bean objects from heap coderanch.comI am getting the user details from database using the following code private Connection conn; public ArrayList | ||||||||||||||||||||||||||||||
2. Using SQLData to pass nested types from DB coderanch.comHi, I have the following structure.. import java.sql.SQLData; import java.sql.SQLException; import java.sql.SQLInput; import java.sql.SQLOutput; import java.util.ArrayList; import java.util.List; public class FundVO implements SQLData { private int fundId; private FundGeneralInfoVO generalInfo; private FundApprovalVO approvalInfo; private List | ||||||||||||||||||||||||||||||
3. Database issue; Migrating from weblogic 6 to 9 coderanch.comHi: I am migrating application from weblogic 6 to weblogic 9 and the database is 10. There is a database code in the application that calls stored procedure to save some kind of information. The same code works prefectly fine on weblogic 6; however if I run the same code on weblogic 9. It breaks down and I get following exception ... | ||||||||||||||||||||||||||||||
4. starting to make a simple database coderanch.comoh my god.. I didnt expect to put myself in this situation... 1.) how to make a simple data base using JavaDB 2.) what objects and classes should i use? 3.) how can i connect THAT database into my .jar program 4.) what IDE should i use? NOTE: i dont have any as in ANY IDEA how to make a simple ... | ||||||||||||||||||||||||||||||
5. database locking coderanch.comWhy not manage the information using an in-memory cache, which periodically dumps to the database? If you really want all 3 to have simultaneous access, database ACID principles are probably going to cause some users to get stale data exceptions. Alternatively, you could catch stale data exceptions and transparently refresh the user's data. | ||||||||||||||||||||||||||||||
6. Database Synchronization coderanch.comIf you want to replace one database with another, or replace a strict setup of tables, there are tools for that. But I suspect if you have 4 databases you might need something more fine grain such as "replacing records in table Y after date X", which case I recommend writing your own synchronization tool. By the way, what you're describing ... | ||||||||||||||||||||||||||||||
7. How to encrypt Database? coderanch.compublic String getHash(String plainText){ try { // turn password text into byte array. // get an instance of MessageDigest object with an algorithm of your choosing (SHA-1, for example) // create a byte array of raw cipher text by calling digest() method of the MessageDigest on your byte array. // encode raw byte array into a base64 string // store resulting ... | ||||||||||||||||||||||||||||||
8. Java Code for DB polling coderanch.com | ||||||||||||||||||||||||||||||
9. using database at remote location coderanch.com | ||||||||||||||||||||||||||||||
10. why can't we store many to many relationships in database? coderanch.com | ||||||||||||||||||||||||||||||
11. Adding Database to application coderanch.comHere i am using my database with in my application /MultiFucntioner/src/main/TelephoneBook.mdb My class is also in this main package Multifunctioner is the application name src is the folder main is the package Telephone.mdb is the database name my database is in a package and in this same package i have my database class too I am using this code to access ... | ||||||||||||||||||||||||||||||
12. time for database access coderanch.comA few things: - You can create a connection at the start of your program, and keep using it. - Check if you really need to loop over 1000 records. Can't you query a subset? You seldom need to retrieve 1000 records in a program. - what are you doing inside your "while ( ResultSet.next())" loop? You are running that code ... | ||||||||||||||||||||||||||||||
13. database entry for user defined classes coderanch.comHi, I have a requirement to make entry to the database for all the custom classes(other than standard ones provided by Java),whenever these are loaded in the application. I can think of the following approach -- have static block in all the user defined classes -- write the required database loading part in the static block. Do you think that there ... | ||||||||||||||||||||||||||||||
14. music format in database coderanch.com | ||||||||||||||||||||||||||||||
15. Store Object in Database coderanch.com | ||||||||||||||||||||||||||||||
16. Java and databases coderanch.comHello, I have a general question about Java applets and databases I have written an applet wich is on a web server and runs in a browser. I would like to read information from a mysql database from the same web server. I can read info from a local mysql database with jdbc connector no problem But to read from a ... | ||||||||||||||||||||||||||||||
17. database created using easyPHP coderanch.comMost providers give you the info you need to connect to the database from within their network: servername, port and account(s). And you know the name of the database, because you created it with easyPHP. That is the info you need to provide in your JDBC connection. Most providers do not allow that you contact the database outside their network. You ... | ||||||||||||||||||||||||||||||
18. JDBC and Database Upgrade coderanch.comHello, Right now we're currently planning to upgrade our oracle database from 9i Enterprise to 11g Standard. We were asked to asses if this upgrade would have any impact on our current java applications. Its an upgrade to a higher version of oracle but to a Standard edition. I actually got hold of a table which lists the detailed differences between ... | ||||||||||||||||||||||||||||||
19. Could not find UTF-8 string in Database coderanch.comHi all, we have fields containing chinese characters in our database table (Oracle 10G). From the UI, we are sending chinese character to JAVA code and trying to look-up against the table column using JNDI-JDBC connection pooling but are unable to fetch any record. Could anyone help me in this issue? I suspect, encoding might be the culprit. | ||||||||||||||||||||||||||||||
20. Database design coderanch.comHello, Hope this is the right place for this. I am trying to make a simple application. This application will consist of projects, for which the data entry operator will fill in the values. So, it will be a typical form. the x axis (so to say) of the page will consist of activities (which may also (or may not) have ... | ||||||||||||||||||||||||||||||
21. Using database in program. Design ? coderanch.comAfter having run through Sun's beginning tutorial on JDBC I am playing around with making a small program that retrieves some rows from a local mySQL database. Is it reasonable to create a class whos responsibility is to retrieve rows based on schema-dependent queries ? After this I have been thinking that it seems likely that this class is something I ... | ||||||||||||||||||||||||||||||
22. Database coderanch.comWhat kind of "assets" do you plan on managing? How do you plan to use the data? Is this your first attempt at creating an relational database? If so, a tutorial might be best to start with. Any idea of what database you will be using? Finally, Java Ranch is NotACodeMill. We will be glad to help you correct your database ... | ||||||||||||||||||||||||||||||
23. copy of existing database coderanch.comHello, All, Good Evening . What is the command to create a copy of an existing database in mysql? I need to manipulate my code using duplicate of my database. I tried using mysql dump command to put duplicate copy on my desktop as: Cd /usr/local/mysql/bin ./mysqldump studentdb > ~/Desktop/studentdb.sql But unsuccessful. Help me Professionals. | ||||||||||||||||||||||||||||||
24. Realational vs object databases coderanch.com | ||||||||||||||||||||||||||||||
25. How to calculate the database size and database free space? coderanch.comHi, I am using mysql 5.1 and 5.0. I would like to calculate Database Disk Usage (Percentage of database disk used) and Database Disk Free Space (Actual free database volume left in MB). I tried following SQL queries: For Database Disk Usage:- SELECT table_schema "Data Base Name", sum( data_length + index_length ) * 100 /sum(data_length + index_length + data_free) "Data Base ... | ||||||||||||||||||||||||||||||
26. Single and Double byte Unicode character in DB through Java if DB has NLS_CHARACTERSET=WE8ISO8859P1 coderanch.comI am using the below Java code to set Latin-1 supplement character in the DB (NLS_CHARACTERSET = WE8ISO8859P1) but due to the DB not supporting these characters it is converting it into '?' or inverted '?'. Is there a way to keep the the DB's NLS_CHARACTERSET as WE8ISO8859P1 and still support various languages (Single or Double Byte Unicode characters)? StringBuffer query ... | ||||||||||||||||||||||||||||||
27. Send a sms to a database coderanch.comHi to all in the forum! I've been thinking how could i send a sms from my mobile to a database maybe sql server. I did some research and found that maybe using at commands could be an option but still don't know what other options exist. Has someone done something like this? | ||||||||||||||||||||||||||||||
28. Uploading excel sheet to Database coderanch.comHI , I am using IDE netbeans, sql 2008 as data base . Now i tried to create a java application and written the following code : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package readtextfile; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.DriverManager; import ... | ||||||||||||||||||||||||||||||
29. Simple Database coderanch.comHi Everyone, If this is in the wrong place, please forgive me. I am writing a fairly simple program to manage leads for my business. This is not a full blown CRM type of project, nor am I ever intending it to be. It's purpose is simply to keep track of the leads' contact information and keep a history of what ... | ||||||||||||||||||||||||||||||
30. Database scheduling coderanch.comHello everyone! I am using Apache Derby database with Tomcat and am trying to implement the following ideas: - everyday at 9 pm for e.g. the database must create a new record/row in a table - everyday at 9 pm for e.g. the database must modify an existing record/row's information My web application will be up always once started. Right now ... | ||||||||||||||||||||||||||||||
31. Database design and class design coderanch.comNot sure where to post this... What are your experiences with database design and class design? Do you design the database first and then go on to class design? Or class design first and then the database? Or do you do a interwound incremental process? What would you consider a best approach? | ||||||||||||||||||||||||||||||
32. Which database effective for Java? coderanch.comI dislike MySQL for database purist reasons - I find it difficult to accept a relational database that has a database engine which doesn't honour constraints, and for a long time was not transactional. But that's just my personal prejudice. If you need a free database I believe either are fine these days. | ||||||||||||||||||||||||||||||
33. Is there any way I can store an object to database in one cell coderanch.comHi , I would like to store an object(such as a list) to a database table in a single cell. What I want to do is store the object in a cell , I want to update the state of the object if I want to later on.Is this possible ? Any idea or suggestion will be highly appreciated . Thanks ... | ||||||||||||||||||||||||||||||
34. Suggestions on database coderanch.comHi, I would like to write a database package where the data is stored locally in xml files, and the interface is through an html page. The data is time history measurements of parameters for a number of test conditions. I would like the html interface to allow the user to locate the test point of interest, based on min/max/average values ... | ||||||||||||||||||||||||||||||
35. Database Access Repeated Each Time coderanch.compublic class MyGenericServlet extends HttpServlet implements javax.servlet.Servlet { static final long serialVersionUID = 1L; Connection con = null; Statement stmt = null; String jdbcDriver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/craigslistdb"; String userName = "root"; String password = "Password"; ResultSet subCategoryRS = null; List subCategoryList = new ArrayList(); Iterator it = null; public MyGenericServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse ... | ||||||||||||||||||||||||||||||
36. Database Monitoring coderanch.comThese parameters can be accessed from tables in the database. For examplpe, in Oracle, they will be available in V$SESSION etc. tables. But these tables might vary from DB to DB. I am not so sure about the other databases though. Moreover, you will need dba privileges to access these tables. Building a single application for different DB's may be tough. ... | ||||||||||||||||||||||||||||||
37. select from DB coderanch.comThe SQL statement in your first attempt was better. Anf the while loop in your new attempt is better. Your new SQL query is invalid. You did not give a table name. (you need to select | ||||||||||||||||||||||||||||||
38. Which database i use coderanch.comi would also recommend mysql for a starter, as i found derby impossible to debug, when i had a problem, as the program had the only allowed connection so i couldn't check my results as i stepped through. But once you are past that stage derby (or the other embedded database recommended) for customer installations. | ||||||||||||||||||||||||||||||
39. How to build a database in java, how to store and read information (objects) ? coderanch.comHi, I would like to write a stand alone application in Java to organize my tasks and set up reminders via Sms or Email to my mobile. I have followed some trainings in Java but no training explains to me how to build a database to store all my datas (objects) to read them etc .. Maybe it is too complicated ... | ||||||||||||||||||||||||||||||
40. Encrypted database with HSQL coderanch.comFirst you need to create the encryption key. The following code assumes that "some_table" exists in "some_db" (neither matters), and that you want to use AES encryption. Class.forName("org.hsqldb.jdbc.JDBCDriver"); Connection con = DriverManager.getConnection("jdbc:hsqldb:file:some_db", "SA", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select CRYPT_KEY('AES', null) from some_table"); rs.next(); String key = rs.getString(1); Store the key in a secure place. Now you can ... | ||||||||||||||||||||||||||||||
41. wants to configure next and previous buttons for database entry ! coderanch.comimport java.awt.event.*; import java.awt.*; import java.sql.*; import java.io.*; public class student extends Frame implements WindowListener,ActionListener,ItemListener { private Frame f; private Button ADD, DELETE, UPDATE, CANCEL,bg,start,last,left,right,Edit,report; TextField id,fname,lname,age; private Label l0,l1,l2,l3,l4,l5,l6,l7; TextArea address; Checkbox x,y; static String p,q; public student() { f = new Frame("STUDENT MANAGEMENT SYSTEM"); ADD = new Button("ADD"); ADD.setFont(new Font("Wide Latin", Font.BOLD,12)); DELETE = new Button("DELETE"); DELETE.setFont(new Font("Wide Latin", ... | ||||||||||||||||||||||||||||||
42. Help with getting the database to take values (Java-MySQL) coderanch.comFirst of all, i apologize that i had to post the entire program and that it may cause confusion. Anyway, my problem basically is the database won't take the values i type into the two fields i have here (usernameField and passwordField). Before i had no problems getting it to work but then after i made some modifications i'm now getting ... | ||||||||||||||||||||||||||||||
43. A Simple Question, Please Help Me If you can? JAVA DB coderanch.comHi Every one I am just trying to develop a system like an EPOS system which can work in one machines I know some java and I did some small assignments. I would do my GUI using JAVA I know SQL and database and I have decided to use Java DB as an internal Database. probably I will do some SQL ... | ||||||||||||||||||||||||||||||
44. Java DB - Reset auto-increment primary key coderanch.com | ||||||||||||||||||||||||||||||
45. comparing values from database and from a textbox coderanch.comprivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String str1 = jTextField1.getText(); String str2 = jTextField2.getText(); if (evt.getSource() == jButton1) { try { Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/student", "root", "root"); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("select name,email from stu where email='" + str2 + "'"); while (rs.next()) { String val1 = rs.getString(1); String val2 = rs.getString(2); if ( val1==str1) { System.out.println("login ... | ||||||||||||||||||||||||||||||
46. database procedures coderanch.com | ||||||||||||||||||||||||||||||
47. How to implement database call on simultaneous click.. coderanch.comhi all, i have a problem in a project that i am implementing. what i m trying to do is logging into my application via two different users then clicking on a button simultaneously and the result should be that both users see two different outputs from database, two different pages. i am not using Connection pooling, i am using a ... | ||||||||||||||||||||||||||||||
48. database problematics coderanch.comi am learning how to use the java derby database as an embedded db in my applications. i know the basics of jdbc programming and have used a little jdbc both in application and web environments but i have some doubts about wheter or not i should fully use jdbc in my application development. i really want to take on the ... | ||||||||||||||||||||||||||||||
49. Database Versioning coderanch.com | ||||||||||||||||||||||||||||||
50. Visitor Database in Java coderanch.comI have been tasked at work with creating a visitor database. I work for the government so it needs to be secure. I don't want to invent the wheel but I am having trouble tracking down one that will fit my needs. It does not need to be complex just a front end that allows for us to insert visitors and ... | ||||||||||||||||||||||||||||||
51. database design issues coderanch.com | ||||||||||||||||||||||||||||||
52. How many types exists for accessing the database? coderanch.com | ||||||||||||||||||||||||||||||
53. i need help on java database arithemetic coderanch.comGood day experts, this code was aimed at performing calculation and inserting the total to database. however, it can only add the first and second amount hence total = amount + rs.getInt(1); for example amount = first or existing amount in the database=300 rs.getInt(1) = second amount to be inputed =200 total =500. Now when I want to input the third ... | ||||||||||||||||||||||||||||||
54. Accessing multiple database coderanch.comHi, i am working on a project which provides me with the facility to access the database of any computer irrespective of the O.S and database type. I could execute querys import and export tables of databases of other computers. So i want an idea abt its coding and implementation.I read it on net that it is possible using R.M.I. The ... | ||||||||||||||||||||||||||||||
55. Beginner books for java and database ? coderanch.com | ||||||||||||||||||||||||||||||
56. PostGIS and spatial database coderanch.comIt seems to me that much of the work done in terms of storing and manipulating the main two types of spatial data, geometric, and geographic is done by functions and procedures that are part of the database engine. Is this the case? Can user defined functions and procedures be created by a regular user, or must one access the database ... | ||||||||||||||||||||||||||||||
57. PostGIS and spatial database coderanch.comHi Connie, Already replied to your other post, but just in case it helps: * PostGIS builds upon the existing geometric data types in PostgreSQL. * PostGIS also extends the existing indexing mechanisms in PostgreSQL to support indexing of spatial data, which obeys different rules from scalar data. * PostGIS provides a set of additional spatial functions that can be used ... | ||||||||||||||||||||||||||||||
58. What is the best way to store List | ||||||||||||||||||||||||||||||
59. Eclipse Built in database coderanch.com | ||||||||||||||||||||||||||||||
60. Database Changes using what? coderanch.comHi, everyone. I have a package that uses three different databases, of which I have to maintain the sql scripts for each upgrade. Does anyone know of some utilities that help with this change management issue. I have looked at LiquidBase already. Hybernate has one built in, but I am far from putting that in. Anyone else? | ||||||||||||||||||||||||||||||
61. Which embadded database is good for application coderanch.comI wanted a database which states when an application is started. Which database is good for it? For Example: If I have an address book java application which take in data and store in database. I happen to shut down the system several times in a day. I wanted the DB system should start when a command is given from java ... | ||||||||||||||||||||||||||||||
62. Basic Database help coderanch.comHello people, I am new to databases. on a question book,i found the belowing question and i were confused.Please somebody help me. Sales Order Processing system has the following entities each stored in a table. Product Product Code Product Name Qty available Price Customer Customer No Customer Name Customer Address Order ... | ||||||||||||||||||||||||||||||
63. how to make a method in database access class for login coderanch.comGuys, how to make a method for Database Access class for login? Need some help quick.Thanks in advance This is what I got so far public class DatabaseAccess { private Connection connection; public DatabaseAccess() throws ServletException { try { Class.forName("org.postgresql.Driver"); this.connection = DriverManager.getConnection( "jdbc:postgresql:postgres", "postgres", ""); } catch (ClassNotFoundException e) { throw new ServletException("problem loading class", e); } catch (SQLException e) ... | ||||||||||||||||||||||||||||||
64. Database Access Class Pattern coderanch.comThis could probably go in the patterns forum...or JSP... or... here? Scenario: You want to use a PreparedStatement to issue an INSERT statement somewhere in your application. String command = "INSERT INTO tablename VALUES(?,?,?,?)"; PreparedStatement pstat = connection.prepareStatement(command); pstat.setString(1, Object.getThing1().toString); pstat.setString(2, Object.getThing2().toString); pstat.setString(3, Object.getThing3().toString); pstat.setString(4, Object.getThing4().toString); pstat.executeUpdate(); What if at some point you want to add another field to that tablename ... | ||||||||||||||||||||||||||||||
65. why do we use database? coderanch.comLooks like you are very new to the internet technology, Just think of the simple scenario Bank Applicaiton As per your first quesiton let us put all Bank data in to one table called "Master" the data will be like customerName, Acc, LoanAcc, Saving Acc , CurrentAcc, and then branch, branchManager, headBrach, HeadBankManger, numberOfBranch, numberOfEmployees .... Do you think 1000 column ... | ||||||||||||||||||||||||||||||
66. Question about in.next() for a database. coderanch.comAfter creating the scanner console and such, this is my code. I want the user to enter one of two options or it will generate an error message. However, I ALWAYS get the error message, no matter what I enter. System.out.println("Enter the student's status (type either resident or nonresident)"); status = in.next(); System.out.println(status); //simply to check my entry for validity //verifies ... | ||||||||||||||||||||||||||||||
67. Database design coderanch.comHello everyone, This question is not related to java or jdbc in specific, but i thought there are some great IT professionals in this forum that can help me out. I am currently working on a project for collection of weather data. The problem is with database design. I have a central server where weather data would be coming in from ... | ||||||||||||||||||||||||||||||
68. updateing the database coderanch.com | ||||||||||||||||||||||||||||||
69. deleting huge database coderanch.com | ||||||||||||||||||||||||||||||
70. Null pointer exception when accessing database coderanch.comHi Folks, Ive been trying to create a mini crud sample using JSP's ,however Im getting a null pointer exception upon trying to insert into the database . Upon checking I found that the request object does contain the passed data, however the same leads to a NPE when inserting to the DB , ive placed the code below. Any help ... | ||||||||||||||||||||||||||||||
71. How to specify the name of the database coderanch.com"use databaseName" is a SQL command. "set databaseName" is similar but for the first time. I've never seen either used in JDBC before though I suppose you could try passing them via a statement and see what happens. My guess is they won't work because you aren't yet connected to a database and JDBC doesn't have the concept of connecting to ... | ||||||||||||||||||||||||||||||
72. Bundled database suggestions coderanch.comFirst impressions count as they say. My application - however fool proof I make the install still requires the user to install and configure a database environment. Currently I support mySQL, MS SQL and Oracle. In theory mySQL is the easiest to setup - but the current versions of the SQL Workbench are buggy and problematic. What I would like to ... | ||||||||||||||||||||||||||||||
73. database in netbeans coderanch.com | ||||||||||||||||||||||||||||||
74. Setting checkbox from database. coderanch.comHi Folks, Im trying to fetch data from database and set the value inn my fields which includes a checkbox. Im able to successfully retreive values from the database and also able to populate my text boxes. But cant seem to check a checkbox if its been set . String query= "SELECT OBJECTID,ISACTIVE,CODE,DESCRIPTION,ISEDITABLE,DOMAINTYPE_OID FROM DOMAIN WHERE OBJECTID="+objid ; stmt = con.prepareStatement(query); ... | ||||||||||||||||||||||||||||||
75. Display values form database coderanch.com
Click on the file to view full content
|