Welcome to Dream.In.Code
Become a C# Expert!

Join 150,390 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,067 people online right now. Registration is fast and FREE... Join Now!




Convert java code to C#

 
Reply to this topicStart new topic

Convert java code to C#, Trying to rewrite Java code to C# what is a setString() and what is th

bthumber
6 Mar, 2008 - 12:16 PM
Post #1

New D.I.C Head
*

Joined: 6 Mar, 2008
Posts: 2

The Java code:
public int findNumericSeqCode(Connection myConn, String standard, String hostName)
.
.
cs = myConn.prepareCall("{call matchHost(@pHost=?)}");
cs.setString(1, hostName + "[0-9][0-9]");
ResultSet myHosts = cs.executeQuery();
cs is a callable statement.

What is the C# equivalent of a setString()?

Thank
User is offlineProfile CardPM
+Quote Post

zakary
RE: Convert Java Code To C#
6 Mar, 2008 - 12:29 PM
Post #2

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 420



Thanked: 8 times
Dream Kudos: 175
My Contributions
From what I am reading about JAVA setString() it seems to work like a HashTable

System.Collections.Hashtable table = new System.Collections.Hashtable();
table.Add(key, value);
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 05:40PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month