Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB AND JAVA COMMUNICATION

Status
Not open for further replies.

crazydeveloper

Technical User
Apr 20, 2001
5
0
0
SG
Hi,

pl. suggest me how to send / receive the data from VB to JAVA and JAVA to VB through Sockets.

we are using JAVA/EJB as a middel tier between Database and VB.


for communication (request/response) i am using sockets

Through the Sockets it's possible to send/receive the data from Server ? OHTER THAN STRING FORMAT ?

now we are getting the data in String Format from the Middle tier(JAVA) and displaying same data in VB(data grid) after formatting the data in records etc.

Thanks in Advnace.



 
Since Java can run on CPUs other than Intel (and Sun isn't a big fan of Intel), it represents integers internally in Motorola format. So if you were to send a number as a binary representation over your socket connection, it would come out on your Windows machine with the bytes reversed. And since VB only does signed numbers, getting it un-reversed is a real pain.

Your best bet is to continue to send numbers in string format. I'd recommend that you decide on a couple of formats and standardize on them.

I think floating-point numbers might be OK, since both Java and VB use the IEEE formats for them. But don't quote me on that.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top