DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = XML-RPC Java/Perl Problem, Help Please? - iTechForums
Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 2
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2010, 08:31 PM
RiveraC RiveraC is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default

XML-RPC Java/Perl Problem, Help Please?


XML-RPC Java/Perl Problem, Help Please?

I am having problem with a Java program that calls a Perl/CGI Script, creates a hash and returns. A simple example looks like this:

Perl Script:
------------------------------------------------------------------------------------

sub createHash{

%hashTable = ();

$hashTable{first} = 1; # inserts a new hash table entry with key=first and value=1
$hashTable{second} = 2; # new entry with key=second and value=2

return %hashTable;

}#end createHash



Java Program
------------------------------------------------------------------------------------

public void getHash(){

HashMap hashmap=new HashMap();
Vector params = new Vector();

//Create Variables
try {
XmlRpcClient xmlrpc = new XmlRpcClient(SERVER_URL);

//Set Strings
String methodName = MyProgram.createHash;



System.out.println(xmlrpc.execute( methodName, params));
//The line below is commented out because it throws an error
//hashmap=(HashMap) xmlrpc.execute( methodName, params);



} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlRpcException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}




}//end class




The problems are this, when, I System.out.print the return hash created in Perl, is only prints out the last value. When I cast the return value to a Java Hash, it throws a string execption.

So how do I return a hash table or multiple values from a perl program?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 01-24-2010, 08:31 PM
Daniel Duesentrieb Daniel Duesentrieb is offline
Junior Member
 
Join Date: Jan 2010
Posts: 8
Default

Hello
on this page you get
the solution for your problem!

http://stackoverflow.com/questions/190450/how-can-i-store-multiple-values-in-a-perl-hash-table
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a perl problem? Licursi Perl 0 01-22-2010 03:13 PM
Perl Problem... please help, I'm stuck!? Sarah R Perl 0 07-24-2009 11:10 AM
Perl problem outputting 1? NaPsTeR Perl 0 02-03-2009 01:29 PM
Perl Problem (please help)? ianjranson Perl 0 08-19-2008 09:57 PM
Perl Array Problem? Missionary Kid Perl 1 06-30-2008 04:37 PM

Your Ad Here

All times are GMT. The time now is 03:20 AM.