Solved

Jave System.out.println(resp)

Posted on 2013-05-13
5
347 Views
Last Modified: 2013-05-14
I'm a .Net developer but at my company wear many hats.

I have a JAR file I need to modify.

The jar is currently doing a response to a command screen.
while (true)
{
	String resp = cnx.getRawResponse();
	System.out.println(resp);
}

Open in new window


I would like to change that and do an out to a WCF or asynchronous load to send data to SQL Server.

I just need to be pointed in the right direction.

I have Eclipse and JDK loaded on my dev pc (64 bit)
0
Comment
Question by:lrbrister
  • 2
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39162105
I don't know about the WCF, but you need to use a PreparedStatement in that loop if you want to insert into a db

http://www.java2s.com/Code/Java/Database-SQL-JDBC/InsertRecordsUsingPreparedStatement.htm

Do the close stuff when you've come out of the loop
0
 
LVL 8

Expert Comment

by:stmani2005
ID: 39162314
0
 

Author Comment

by:lrbrister
ID: 39162345
Going to try your examples today and get back to you
0
 

Author Closing Comment

by:lrbrister
ID: 39165808
Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39165827
:)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question