Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transaction not connected error in Powerbuilder 12.5.1 Wcf service

659 views
Skip to first unread message

zakkar

unread,
Aug 10, 2012, 4:07:30 AM8/10/12
to
Hi ,
I'm using Powerbuilder 12.5.1 build 4595. I have created a wcf service and I want to login to a database and get some data.

I have the below code


#IF DEFINED PBWDOTNET THEN
is_ip_address = string(system.configuration.ConfigurationManager.AppSettings.Get("IP_ADDRESS"))
is_username = string(system.configuration.ConfigurationManager.AppSettings.Get("USERNAME"))
is_password = string(system.configuration.ConfigurationManager.AppSettings.Get("PASSWORD"))
is_password = f_decr_new(is_password)
is_sid = string(system.configuration.ConfigurationManager.AppSettings.Get("SID"))
il_port = long(system.configuration.ConfigurationManager.AppSettings.Get("PORT"))
is_DBMS_TYPE = string(system.configuration.ConfigurationManager.AppSettings.Get("DBMS_TYPE"))

ls_return = this.connect_db(sqlca)
if ls_return <> "0" then
return ls_return
end if
#END IF

The code for the connect_db is the below(I'm passing by ref the SQLCA)

atr_trans.DBMS = is_DBMS_TYPE
atr_trans.logid = is_username
atr_trans.logpass = is_password
atr_trans.database = is_username
atr_trans.Autocommit = True
atr_trans.servername = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host="+is_ip_address+")(Port="+STRING(il_port)+")))(CONNECT_DATA=(SID="+is_sid+")))"

Connect Using atr_trans;

If atr_trans.Sqlcode <> 0 then
return SQLCA.sqlerrtext
end if

return "0"


I'm not getting any sqlca errors because if I did I'm returning the values.
So , I'm connected I after that I want to do a select in my database
So I write Select bla bla ...
I always getting the error
Transaction not connected...

What is going on ?
I cannot connect to a database using Wcf service in Powerbuilder?????
Kind of weird
Appreciate any help you could give me.
thank you







bruce.a...@yahoo.com

unread,
Aug 16, 2012, 2:00:08 PM8/16/12
to
This group has been marked read only on the Sybase server. In addition, the feed between Google and the Sybase server is not currently working. If you post through Google the post will never show up on the Sybase server, and most people who answer questions in that group will never see it. Instead, you may want to access the Sybase newsgroups directly at:

http://www.sybase.com/detail_list?id=11507&pageNum=1&multi=true&show=1248
0 new messages