SQL 3 « SQL « Java Database Q&A





1. Design Question - SQL Calls or Java Code    forums.oracle.com

So, suppose in Java that I wanted to have a data structure to house all this stuff. I'd have a Company class which contains a list of Department objects, which contain a list of Employees...... so, I want to create the hierarchy representation in Java (for ease with a reporting utility). Is it better practice to use multiple SQL queries when ...

2. Attaching multiple combo box with each other on d basis of sql 2005    forums.oracle.com

hello friends, i m facing some problem in attaching multiple combo box with each other with the sql 2005 in servlets. ok so this is my problem in deatil:- i just want to take multiple combo box on 1 page nd want to join all the combo box with sql database. and on the execution time when ever any user select ...

3. Question concerning database DATETIME type and java.sql.*    forums.oracle.com

I'm talking about Java 1.6.0_u14. If a datetime database column exists in a table, and the table has been fetched by executing a prepared statement, It is possible to get independent Date and Time objects from the column in the result set: Date date = ResultSet.getDate(index); Time time = ResultSet.getTime(time); In other words, date and time objects may be fetched of ...

4. Does JRE 1.6 include a built-in SQL database?    forums.oracle.com

I'm investigating the creation of a custom Java database application that's intended to run on multiple systems, particularly Windows and Macs. I'd like to store and retrieve my data using SQL, rather than as flat files. At the same time, I'd also like to minimize the number of jar files required by the application. I've used JDBC to talk to external ...

5. Need Help with Challenging SQL Regex    forums.oracle.com

I need some help developing a regex that will be used to filter some ill-written legacy SQL prior to execution on SQL Server. I've demonstrated that I can intercept and modify the SQL but the scope of this regex is beyond my experience. What I need to do is insert the string "with(nolock)" following each table name (and optional alias). Here ...

6. Need Help with SQL in Java -- Newbie :-)    forums.oracle.com

7. How to Change the default format for differnt language both in java and SQL    forums.oracle.com

Hello, I am using SQL Anywhere in my application.And in my java client application user can log in with their preferred language like English,French,German,Chinese,etc....When even the user log in to the application the data from the database will be displayed with respective to the language.But when i tried to see the dates in Interactive SQL all the dates r in the ...

8. Java and SQL printing values separately    forums.oracle.com

I have an access database connected to a java program i wrote. Its supposed to be used to make a school schedule without allowing any hour collision or classroom etc. I have a table where the schedules are saved, in that table there's a colum in which i save the classroom, hours and day of the class This is the format ...

9. SQL between in Java    forums.oracle.com





10. JAVA with SQL question    forums.oracle.com

11. byte[] to sql and digital persona    forums.oracle.com

Hi, I'm currently working on a project that deals with Biometrics. I am using Digital Persona's Gold SDK. I'm trying to store the fingerprint which is in byte[] to a SQL database. Any idea on what data type to use? I tried to use Blob on MySQL and it stores fine but when I retrieve data from the SQL and pass ...

12. please help me classes and java sql...    forums.oracle.com

13. java.sql.BatchUpdateException    forums.oracle.com

The 'Connection' object and the Statement object is shared by lot of objects. I am keeping a static integer variable to store the batch updation count. After caling the 'addBatch' method, I will increment this variable. Whenever the value of this variables reaches 20 , I will call the executeBatch method and call the db.commit() method and rest the static variable ...

14. SQL & java    forums.oracle.com

I have this code: public Vector getUitgeleend(int id) throws SQLException { Vector materialen = new Vector(); String sql = "SELECT Materiaal.Naam, Materiaal.Id, Uitleen.Id, Verbond.Id "; sql += "FROM Verbond INNER JOIN (Materiaal RIGHT JOIN Uitleen ON Materiaal.Id = Uitleen.MateriaalId) ON Verbond.Id = Uitleen.VerbondId WHERE (((Verbond.Id)=?))"; Connection conn = AccessDatabase.getInstance().getConnection(); PreparedStatement ps = conn.prepareStatement(sql); ps.setInt(1, id); ResultSet res = ps.executeQuery(); while (res.next()) ...

15. how do we specify the username in sql    forums.oracle.com

16. adding items to list from sql    forums.oracle.com





17. A SQL Problem ....    forums.oracle.com

18. Dealing with SQL wildcard characters (% and _) in Java    forums.oracle.com

*v - What this depict is - anything that ends with v but Pattern class meant something different and gives wrong results. I think Pattern class matches all v in the matched String. eg. For above case Pattern class return the String 'kivsse' as th result but what I want in the result is "All the files that ends with v". ...

19. Java and SQL    forums.oracle.com

That part of the class (the getConnection() method) was prepared by our proffesor and I don't really know what it does. Sorry I'm just a beginner and as far as I understand exceptions there must be something wrong in the try{} and only then you get the information from the catch{}? So how can I help myself with stack trace? I ...

20. Sql and Java    forums.oracle.com

21. Sql and Java    forums.oracle.com

22. SQL and Aquadata studio    forums.oracle.com

Hi, 1. I need help.In Aquadata studio,it is impossible to declare 2 primary keys.However in Relational model,it is possible to declare two or more primary keys.How do I represent these primary keys using Aquadata studio? 2. How can I install MySQL server on my PC.I have tried every means but I still encounter errors. Please help.!!!! Martin

23. Java and SQL diacritic problem    forums.oracle.com

24. login authnetication using cookies and sql database    forums.oracle.com

I think that's what I said, and certainly what I meant. The session will use more server memory and is not as scalable, but if they use the session, they can avoid the trip back to the database on each request. And if you just use the cookie, the login could last much longer than a session, and I know systems ...

25. SQL Problem Driving me Crazy    forums.oracle.com

This will allow the driver to perform the proper date handling. Your previous version used the java.sql.Date classes toString() to specify the date as a string, which may not be in the format you, or Access, were execpting. However, if you want to stick to the path of using a Statement instead of a PreparedStatement, you really have no need to ...

26. Cannot import java.sql.BaseQuery    forums.oracle.com

27. SQL commands being "ignored" in java.    forums.oracle.com

Hi, quick question. I am connected to an oracle database, I have some simple select X from X queries running to populate some drop down menus. On my latest query needed though, my sql seems to be, for lack of a better word, ignored. I have a need to limit the rows returned and have tried multiple different strategies and all ...

28. sql procedures in java code    forums.oracle.com

Hello I wold like to use sql stored procedure in my web application but , there is a problem to create stored procedure in phpMyAdmin. then my hoster offer phpMyAdmin to manage mysql databases. there is an alternative to create the procuders in java code and execute it as sql string ??? Thanks

29. java.sql.DataSet et al.    forums.oracle.com

31. sql pattern versus regex    forums.oracle.com

Is there some ready to use API to match Strings with patterns, as myString.matches(myregex) would do, but with the much simpler sql pattern syntax: _ is wildcard for one character % is wildcard for a series of characters. To translate a pattern string according to that sql style syntax into a regex, such that the usual String.matches() or the java.util.regex.Pattern could ...

32. package javax.sql does not exist    forums.oracle.com

33. SQL Execution    forums.oracle.com

Dear Members, I am new to application designing. In our application we have near about 20 classes in each class we are executiing very simple SQL queries , which have only 2 to 3 parameters. We have written total 30 SQL queries in these classes. Is it require to provide separate class which execute these SQLs? Could you please suggest me ...

34. java.sql.DataTruncation    forums.oracle.com

I have recently switched over to SQL Server and am now using the JDBC driver from jTDS (http://jtds.sourceforge.net/). I have been getting a new error that I am not quite sure what it means or how to fix it. Occasionally I will get the error: java.sql.DataTruncation: Data truncation This is what I know: "This exception is thrown when a piece of ...

35. Java and MS-Access: Login Authentication trough SQL    forums.oracle.com

Hi all, I am currently new to the world of java and would like to ask something for a school project. We have an MS-Access database setup which we want to use as an login-database. We can select from the tables in the database using a standard SQL query, and print out the output, but we do not know how to ...

36. Translating SQL to Java    forums.oracle.com

EnitityCursor customers = da.customerByCustomerName.entities( ); try { for ( Customer customer : customers ) { displayCustomerRecord( ); } } finally { customers.close( ); } } I have a class called DatabasePut that actually put all the information in a text file for me. The class displayCustomerRecord shows only how I want the information displayed on the screen. Any help is appreciated! ...

37. SQL?    forums.oracle.com

38. SQL resource control    forums.oracle.com

Hi All, I am facing a problem. I have certain classes, where a method returns result set to the callee method. My problem is want to close the SQL resources I can not close the preparedStatement object in the called method as it wud close the result set. The result set object i can close in the called method, but then ...

39. SQL validation    forums.oracle.com

the other way, would be to use an SQL parser. However, this isn't foolproof. There's no standard SQL dialect, unless you count Ansi 92 SQL. For example, Oracle will allow a TO_DATE function, but DB2 would not. So SQL parsing won't work in all cases, and will return errors where the SQL is actually valid in some databases. I'd go with ...

40. when using java.sql classes    forums.oracle.com

Thanks Flounder for answering first part of question, but i have MySQl and not SQL so am wondering if java.sql will work with MySQL. would appreciate further answer but guess I can always just try it and see for myself. Thanks again. PL P.S. Guessing you are Animal House fan. One of my alltime favorites. Some of Belushi's best moments on ...

41. Setting up for java.sql?    forums.oracle.com

Hi everybody, I've been doing some research, and everything I've seen has just made me more confused, so I was hoping someone here could clarify things for me. I have Java 5.0 on my computer, and I need to read an Excel worksheet into the program. What I have so far is that we can use a Windows driver to do ...

42. sql problem    forums.oracle.com

Hi friends, One problem i am facing , 1> I am having two tables x and y 2> In both the tables (x and y) I am having an primary key User_ID for both the tables. 3> I am inserting the data like (name,adderss) in table x and in table y i am inserting (phone number) at the same time . ...

43. SQL Trace    forums.oracle.com

Hi, I am a beginner in Java. I want to know if it is possible to filter out only SQL Stack Trace from Java Stack Trace through any commands or java Programming. Currently, it is posssible in UNIX, where I can make a seperate SQL Trace from Java Stack Trace along with line numbers in Java class where it is called. ...

44. SQL question    forums.oracle.com

45. SQL like    forums.oracle.com

They should read a good SQL book or two, JDBC is really only about connecting to the DB. SQL is a whole different kettle of fish. And a large topic which should not be overlooked. Most Java books teach little about actually writing queries. A lot of Java developer overlook the power of the DB and SQL/ + Pl/SQL and try ...

46. ERD to SQL    forums.oracle.com

47. sql help-Please help-urgent help req-i have 2probs    forums.oracle.com

Second Problem is that in a servlet page "show profile", i want to access the personal details along with the dateof application so what method i thought was as (rs.getDate()) returns an java.sql.Date object, i can apply some methods of java.sql.Date on this object being returned to get the integer values of date month and year seperately.Then create string variable by ...

48. DB interaction SQL    forums.oracle.com

49. SQL Developer    forums.oracle.com

Hi, currently I am programming an own SQL developer. User can enter SQL Statements in a JTextBox. How can I emphasize the keywords like - SELECT, FROM, WHERE, ... in blue color - "value" e.g. name="value" in red color - ... is there any jar api's to use in my application, or do I have to program it individually, if so ...

50. SQL Problem    forums.oracle.com

hi this is dingdongbell, I have gone through ur problem.The Solution for ur problem is: 1.check what type of sql statement ur using. if u used select statement then keep in mind that primary key settings of the table and datatype of the attribute. for example u want retrive the student details of the Student table whos sid is id=25 then ...

51. SQL in Java help    forums.oracle.com

52. Java SQL calls...    forums.oracle.com

Hi all, My appologies in advance I am still very new to java. I have a simple (ish) question, more of a general discussion than anything else, but anway. I am dabbling in creating applications that connect (using jdbc) to a MYSQL database, eventually I intend on using some kind of vector/array to store the objects that I map. My question ...

53. using sql in java    forums.oracle.com

54. Java sql Getstring    forums.oracle.com

55. using SQL reporting services with java    forums.oracle.com

56. sql command    forums.oracle.com

This is the code, backupString is a String cantaining the command that is already running in the terminal, but not running from java The command is supposed to make a Backup of a DB schema, I wrote it in the previous post. More general, what makes a command run in the terminal and doesn't run from java ? Message was edited ...

57. OT: SQL    forums.oracle.com

I want to create a user table in a database that automatically assigns an ID number when a new user gets inserted. something like: create table user (primary key id int, varchar(30) username, varchar(30) passwd) I used to know how to do this... is there anyone out there that can help me?

58. Emulate SQL TRANSLATE    forums.oracle.com

Hello I don't know if I'm the right place, but here we go: Is there a way to emulate the SQL command "TRANSLATE"? What I mean is: I have a table, let's say, with people's names... those name have characters like "", "", ""... Whenever I search a name, if I search "Linda", I would like to get in return both ...

59. problem with sql developer in 11g    forums.oracle.com

60. Java SQL interpreter    forums.oracle.com