PowerBuilder and sockets

I am having trouble to establish a connection from a PowerBuilder
Application to a
Unix-demon-process via Berkley Sockets..
Using an Unix-Client everything works fine, but trying to do the same
coding in a
Power-Script the client can't reach the demon-process. To use the
socket-related
functions (like socket(), connect(), etc.) i declared them as local
external functions.

This is my Code:

<External Function Declarations>:
Function uint socket(int af, int typ, int protocol) Library
"wsock32.dll"
Function int connect(uint sfd, REF s_sockaddr_in sockaddr, int len)
Library
"wsock32.dll"
Function ulong inet_addr( REF string cp) Library "wsock32.dll"
Function ulong htonl(ulong ipaddr) Library "wsock32.dll"
Function string inet_ntoa(s_in_addr inaddr) Library "wsock32.dll"

Additional structures:
(containing the network-informations)

s_in_addr:
    s_addr       unsigned long

s_sockaddr_in:
    sin_family    integer
    sin_port       unsigned integer
    sin_addr      s_in_addr
    sin_zero[8]  character


Code in the Object:
usignedlong lul_sfd
unsignedlong lul_inetaddr

s_in_addr           inaddr
s_sockaddr_in    sockaddr

// Winsock2.h - Entries
int AF_INET=2
int SOCK_STREAM =1

string ls_inaddr

lul_sfd = socket(AF_INET, SOCK_STREAM, 0)

sockaddr.sin_family = AF_INET
sockaddr.sin_port = 22333 //just example
ls_inaddr = "123.123.132.124" //just example

lul_inetaddr = inet_addr(ls_inaddr)

 sockaddr.sin_addr.s_addr = htonl(lul_inetaddr)

li_connect = connect(li_sfd, sockaddr, 24)

The socket()-function returns a correct socketno. but the connect()
fails.

Maybe it is impossible to open a socket-connection from a
PowerBuilder-application
(but i can't imagine that!)

If anyone has experience with that kind of stuff: Please reply!



0
Carsten
1/12/1999 10:50:33 AM
sybase.powerbuilder.connection 3893 articles. 0 followers. Follow

0 Replies
993 Views

Similar Articles

[PageSpeed] 37

Reply:

Similar Artilces:

Client Connections and PowerBuilder connections
What do I need to do to my NT box to be able to run a browser from a client machine to run the demo database/tutorial? I am able to run the demo from the NT server itself, but would like to test client connectivity. My client has browser capability. Furthermore, I am anticipating on using Jaguar as a middle tier for accepting communications from PowerBuilder. Jaguar would then take the SQL and pass the information onto a SYBASE SQL Server. I am not even concerned with any of the business logic that may be involved but am more interested in getting Jaguar to be a middle tier while...

Connection from PowerBuilder connects to Internet
We have a client who has experienced a problem I've seen posted on this forum but can't find now. When they connect with our application to SQLAnywhere, they're getting their connect to AOL dialog. They can cancel out and everything works. I remember that it's a problem with their version of the winsock.dll, but I don't remember the recommended solution. Thanks for you help, James Clanton >When they connect with our application to SQLAnywhere, they're getting their >connect to AOL dialog. They can cancel out and everything works. I >rem...

PowerBuilder 9.0.1: Connect to Oracle Using the PowerBuilder Native Driver
Could anyone please email me this Solved Cases? It may be related to our production issue. http://info.sybase.com/resolution/detail.stm?id_number=11000397 http://info.sybase.com/resolution/detail.stm?id_number=11008896 Thanks in advance, John johnshi@yahoo.com The first one only affects the development environment, and the second one is only applicable to datawindows build with the old PBDBMS method. What problems are you having? On 12 Oct 2004 08:56:32 -0700, John Shi wrote: >Could anyone please email me this Solved Cases? It may be >related to our production i...

Connections in powerbuilder
Is there any whay to create two cursors (nested cursors) at the same time against the same connection in powerbuilder, or do I have to declare two (or more) connections? regards Kjell Brandes It depends on the database. Some (e.g., Oracle) don't have a problem with that. Others (e.g., SQL Server) don't allow a select on a connection that already has a result set pending. In the latter case, you have to create a second connection for the second cursor. On Tue, 7 Nov 2000 15:52:32 +0100, in powersoft.public.powerbuilder.database Kjell Brandes <kjell.brandes...

Connections in PowerBuilder
Is there any whay to create two cursors (nested cursors) at the same time against the same connection in powerbuilder, or do I have to declare two (or more) connections? regards Kjell Brandes I answered this in another section. Please don't cross-post. On Tue, 7 Nov 2000 15:51:47 +0100, in powersoft.public.powerbuilder.datawindow Kjell Brandes <kjell.brandes@sem@con.se> wrote: >Is there any whay to create two cursors (nested cursors) at the same time >against the same connection in powerbuilder, or do I have to declare two (or >more) connections? >...

Powerbuilder connection
Guys need some help with this. We have a powerbuilder app which runs against 8.1.7 database on win. nt 4.0. Power builder is 7.0.3 version. Every other day I see either hungup apllication or ora-03113 end of file on communication channel oracle message. Any help from any body. There are lots of things that can cause ORA-03113 errors, many not having to do with PB at all. It's difficult to tell what the problem might be without more information though. For example, Oracle technote 1003596.6 indicates that: What does ORA-03113 "end-of-file on communication channel&quo...

connect by powerbuilder
I download a ASE12.5 and install it on my machine , but when I connect it by pb6.5 , it tell me "dbms syc sybase system 10/11 is not support in your current installation " how I do to solve it ? I work in ASE12.5 and nt4.0+sp6.0 and pb6.51 . thank you! devid wrote... > I download a ASE12.5 and install it on my machine , but when I connect it > by pb6.5 , it tell me "dbms syc sybase system 10/11 is not support in your > current installation " > > how I do to solve it ? > > I work in ASE12.5 and nt4.0+sp6.0 and pb6.51 . This mea...

Powerbuilder Socket.
hi! is there a way to create a program in Powerbuilder 7.0 that utilizes sockets. In that way I could create a simple Instant Messaging programming using client and server sockets... would that be possible? If there is, could you guys show me some code or may point me to a site that offers informations regarding to my query... thank you jun Joe, asked the same question yesterday. Take a look at the answers on his post HTH Arnoud Url: http://www.gloriant.be "Jun" <jmartinph@yahoo.com> wrote in message news:Xns931894889929jmartinphyahoocom@199.93.177.7...

Powerbuilder 5 to Powerbuilder 10
Hi all We have migrated our application from powerbuilder 5 to powerbuilder 10. after migration to version 10, alignment in most of reports disturbed. please advice me some solution. On Fri, 29 Feb 2008 12:45:01 +0100, Adnan Jamil <adnanjamil@nji.com.pk> wrote: > Hi all > > We have migrated our application from powerbuilder 5 to powerbuilder 10. > after migration to version 10, alignment in most of reports disturbed. > please advice me some solution. Adnan, Is this a SQL Anywhere question? If not, you have posted to the wrong forum. If yes,...

Connection from PowerBuilder
I tried a connection to a server NT with ASA 6.0 from a client with PowerBuilder 5.003 or 6.5 via ODBC drivers and I have this message error : sqlstate=S0801 [SYBASE] ODBC Driver [Adaptative Server Anywhere] communication link failure : communication error. Any suggestions ? Gilles ARNAL. ...

Use PowerBuilder DLL in PowerBuilder
We use PB6.5. We would want to use a DLL create from PB in a PB application. We compiled an a PBL as DLL. After we tried to use DLL in a user object external, but without success. How can we do to use DLL create from PB or use in a new PB application some object (visual and no) before compiled with PB? Any help will be appreciated. Saul.Convalle@mail.cec.it Thanks When you create a DLL from a PB library it is not really a standard Windows DLL. I'm not sure what the difference is. If you are making calls from PB then just use the standard PB calling syntax the ...

PowerBuilder, connecting to MS SQL Server using MSS native driver: A field which is defined as a varchar (450) is truncated to 255 characters in PowerBuilder
PowerBuilder, connecting to MS SQL Server using MSS native driver: A field which is defined as a varchar (450) is truncated to 255 characters in PowerBuilder I am using Power Builder 7.0 with SQL Server 2000 Database. I created a datawindow using a varchar(450) field. It is allowing me enter and save 450 characters but when I retrieved the data it is truncating it to 255 chars. I looked in the database all 450 characters are there. Why it is truncating the data on retrieve? Please help me out if anybody knows the solution Thanks in advance because the native interface (Micr...

Connecting Jaguar object to connection cache from PowerBuilder
I have the following code in PowerBuilder Jaguar User Object Activate event to connect to the transaction object to tea_thin Oracle connection cache which is working successfully. It fails to connect to database and the server log shows connect failed. Any help at the earliest will be highly appreciated. Thanks for your time. -Hitesh -------------------------------------------- ErrorLogging erlinfo_base this.GetContextService("TransactionServer", & txnsrv) this.GetContextService("ErrorLogging", & erlinfo_base) SQLCA.DBMS = "JDS" ...

Powerbuilder components use only 1 connection from connection cache
Hi all, I'm currently investigating a performance bottleneck in jaguar. I've reported this problem before and got some helpful hints from this forum so I'm back for more, since the hints weren't helpful enough. I have a web application which uses Powerbuilder components as the backend. Even when I generate 30 calls that each take 1 minute, the Jaguar server reports that it uses only one connection!! When I check oracle, it reports that only one session is active from the Jaguar server. Now I can just handle this if it was only one session but when i tested this f...

Web resources about - PowerBuilder and sockets - sybase.powerbuilder.connection

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/21/2015 3:15:47 AM