zakkar
unread,Aug 10, 2012, 4:07:30 AM8/10/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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