Question : Citrix: unable to load/see printers on Mac

Hello Everyone;

This is very strange problem, I have 2 citrix servers 4.0 and (XenApp) which was upgraded recently.

I have 2 mac users experiencing problems when they try to print from  XenApp server. Simply no printers will show up. But when they connect to Citrix 4.0 they can see the printers and they are able to print as normal.

I tried to re-install Citrix client on both mac laptops but that did not fix it, I also tried replicating the drivers from the 4.0 server to the new XenApp but no luck .

Any suggestions ??  Please feel free to list them ...

Answer : Citrix: unable to load/see printers on Mac

I would say that the problem is that your text2insert string has a ' character somewhere in it which is interpreted as the end of the string. Take a simple example of trying to insert the string

String text2insert = "goat's";

Your SQL statement then becomes...

INSERT INTO feedback.html(data) VALUES('goat's');

Hopefully you can easily see how this creates a syntax error.

The normal way that you might approach this is with PreparedStatements, with code like the below...


PreparedStatment stmt = con.prepareStatement("INSERT INTO feedback.html(data) VALUES(?);");
stmt.setBytes(1, text2insert.getBytes());
stmt.execute();

(Note: that I haven't played with BLOB's or MySQL in Java, but my quick research leads me to believe that using a byte[] is the correct way to deal with BLOB columns in MySQL)

This way there are no issues with special characters, escaping, security holes, etc that you get with trying to build your sql string manually.
Random Solutions  
 
programming4us programming4us