Solved

Jave System.out.println(resp)

Posted on 2013-05-13
5
346 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

920 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now