Solved

Jave System.out.println(resp)

Posted on 2013-05-13
5
344 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
Comment Utility
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
Comment Utility
0
 

Author Comment

by:lrbrister
Comment Utility
Going to try your examples today and get back to you
0
 

Author Closing Comment

by:lrbrister
Comment Utility
Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

763 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

10 Experts available now in Live!

Get 1:1 Help Now