Hi,
I created simple application in Powerbuilder 12.5.1 Build
4595 which connects to a SQL Server 2008 R2 database. I am
using the SQL Server native client has the connection
method.

When I try to connect to the database within code, I am
getting a Transaction Not Connected Error with a sqlcode of
-1.

The error is coming from a client machine which has Windows
XP SP3 installed.

I have installed the SQL Server 2008 R2 native client
drivers along with the PB.NET 12.5 runtime libraries which
was generated via Sybase's runtime packager.

So my question is are there libraries that are missing from
the runtime packager that would prevent me from connecting
to our SQL Server?

Also, just to simulate that it is a sql server driver issue,
I changed the password to an invalid password and tried it
again. I don't get the "Invalid password" error message, it
is also the Transaction Not Connected message. Any ideas on
why this is happening?

On 11/2/2012 12:20 PM, Thomas Chiu wrote:
> Hi,
> I created simple application in Powerbuilder 12.5.1 Build
> 4595 which connects to a SQL Server 2008 R2 database. I am
> using the SQL Server native client has the connection
> method.
>
> When I try to connect to the database within code, I am
> getting a Transaction Not Connected Error with a sqlcode of
> -1.
>
> The error is coming from a client machine which has Windows
> XP SP3 installed.
>
> I have installed the SQL Server 2008 R2 native client
> drivers along with the PB.NET 12.5 runtime libraries which
> was generated via Sybase's runtime packager.
>
> So my question is are there libraries that are missing from
> the runtime packager that would prevent me from connecting
> to our SQL Server?
>
> Also, just to simulate that it is a sql server driver issue,
> I changed the password to an invalid password and tried it
> again. I don't get the "Invalid password" error message, it
> is also the Transaction Not Connected message. Any ideas on
> why this is happening?
>

Do not forget to deploy with runtime msvcp100.dll,
msvcr100.dll and probably msvcp71.dll, msvcr71.dll, atl71.dll.

I had the same issue, wich disappeared when I deployed those files
with the pb.net runtime. Also I've read in some posts that pb.net
needs some files from pb.classic runtime (pbvm), but I'm not sure, as
my client machines have both runtimes installed.

Andreas.

On 2 Nov 2012 08:20:34 -0800, Thomas Chiu wrote:

>Hi,
>I created simple application in Powerbuilder 12.5.1 Build
>4595 which connects to a SQL Server 2008 R2 database. I am
>using the SQL Server native client has the connection
>method.
>
>When I try to connect to the database within code, I am
>getting a Transaction Not Connected Error with a sqlcode of
>-1.
>
>The error is coming from a client machine which has Windows
>XP SP3 installed.
>
>I have installed the SQL Server 2008 R2 native client
>drivers along with the PB.NET 12.5 runtime libraries which
>was generated via Sybase's runtime packager.
>
>So my question is are there libraries that are missing from
>the runtime packager that would prevent me from connecting
>to our SQL Server?
>
>Also, just to simulate that it is a sql server driver issue,
>I changed the password to an invalid password and tried it
>again. I don't get the "Invalid password" error message, it
>is also the Transaction Not Connected message. Any ideas on
>why this is happening?

On 11/5/2012 5:38 AM, Andreas Mykonios wrote:
> Hi.
>
> Do not forget to deploy with runtime msvcp100.dll,
> msvcr100.dll and probably msvcp71.dll, msvcr71.dll, atl71.dll.
>
> I had the same issue, wich disappeared when I deployed those files
> with the pb.net runtime. Also I've read in some posts that pb.net
> needs some files from pb.classic runtime (pbvm), but I'm not sure, as
> my client machines have both runtimes installed.
>
> Andreas.
>
>
> On 2 Nov 2012 08:20:34 -0800, Thomas Chiu wrote:
>
>> Hi,
>> I created simple application in Powerbuilder 12.5.1 Build
>> 4595 which connects to a SQL Server 2008 R2 database. I am
>> using the SQL Server native client has the connection
>> method.
>>
>> When I try to connect to the database within code, I am
>> getting a Transaction Not Connected Error with a sqlcode of
>> -1.
>>
>> The error is coming from a client machine which has Windows
>> XP SP3 installed.
>>
>> I have installed the SQL Server 2008 R2 native client
>> drivers along with the PB.NET 12.5 runtime libraries which
>> was generated via Sybase's runtime packager.
>>
>> So my question is are there libraries that are missing from
>> the runtime packager that would prevent me from connecting
>> to our SQL Server?
>>
>> Also, just to simulate that it is a sql server driver issue,
>> I changed the password to an invalid password and tried it
>> again. I don't get the "Invalid password" error message, it
>> is also the Transaction Not Connected message. Any ideas on
>> why this is happening?

Although no one else raised this, the Transaction Not Connected / -1 is
the default values for the transaction object prior to a CONNECT being
called. Are you sure that you are checking the right transaction object?
When I run this simple code,

sqlca.DBMS="SNC"
connect using sqlca;
if (sqlca.SQLCode<> 0 ) then
MessageBox( "Error", "unable to connect:"
+ sqlca.SQLErrText );
end if

the "Transaction not connected" SQLErrText is true at the Connect Using
SQLCA line but not after it is executed. After that line is executed, I
get an error from the DB client software. I would expect a different
error if the client software is not present.

On 02/11/2012 12:20 PM, Thomas Chiu wrote:
> Hi,
> I created simple application in Powerbuilder 12.5.1 Build
> 4595 which connects to a SQL Server 2008 R2 database. I am
> using the SQL Server native client has the connection
> method.
>
> When I try to connect to the database within code, I am
> getting a Transaction Not Connected Error with a sqlcode of
> -1.
>
> The error is coming from a client machine which has Windows
> XP SP3 installed.
>
> I have installed the SQL Server 2008 R2 native client
> drivers along with the PB.NET 12.5 runtime libraries which
> was generated via Sybase's runtime packager.
>
> So my question is are there libraries that are missing from
> the runtime packager that would prevent me from connecting
> to our SQL Server?
>
> Also, just to simulate that it is a sql server driver issue,
> I changed the password to an invalid password and tried it
> again. I don't get the "Invalid password" error message, it
> is also the Transaction Not Connected message. Any ideas on
> why this is happening?
>