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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to sqlserver 2000 from windows 7 64 bit OS.

Status
Not open for further replies.

Dave2012k

Programmer
Aug 14, 2012
9
US
Dear friends,

I am trying to connect to sqlserver 2000 which is running on a windows server 2003 32 bit from a windows 7 64 bit OS. I get the connection error. I have defined following connection properties in the ini file.
[DataBase]
// Profile UAP_SQL
DBMS =SNC SQL Native Client(OLE DB)
ServerName = SERVERNAME
Database = Database Name
UserID= user_id
DatabasePassword= password
LogId = login id
LogPassword = Log password
AutoCommit = False
DBParm = "Database='uap_sql',Provider='SQLNCLI10',TrustedConnection=1"

When I try to connect from powerbuilder run time environment I get the following error.
"Cannot connect to Database
Microsoft sqlserver 10.0
Login failed for user '(null)'. Reason:Not associated with a trusted SQL server connection.

Any help is appreciated!!
Thanks,
Dave.

 
Hi Dave,

Try to use "TrustedConnection=0" (instead of =1 ). If I'm not wrong the trustedConnection=1 will try to do login with your windows-user and password. To use the ones specified in userid and logid logpassword, it should be '0'.

Another thing: take out the white spaces around the = sign:

[DataBase]
// Profile UAP_SQL
DBMS=SNC SQL Native Client(OLE DB)
ServerName=SERVERNAME
Database=Database Name
UserID=user_id
DatabasePassword=password
LogId=login id
LogPassword=Log password
AutoCommit=False
DBParm="Database='uap_sql',Provider='SQLNCLI10',TrustedConnection=0"
PowerBuilder 11.5 > Connection Reference > Database Parameters


Chapter 1: Database Parameters
TrustedConnection
Description

Specifies whether the current Windows account credentials can be used for authentication.
When to specify TrustedConnection You must specify the TrustedConnection parameter before connecting to the database.

Applies to
ADO.NET
SNC SQL Native Client for Microsoft SQL Server

Syntax
TrustedConnection=value
Parameter

Description
value

Specifies whether the current Windows account credentials can be used for authentication. Values are:
0 (Default) The User ID and Password are specified in the connection.
1 The current Windows account credentials are used for authentication. The User ID and Password supplied in the connection are ignored.

Default
TrustedConnection=0

Examples

Example 1
To specify that PowerBuilder should trust the connection:
Database profile Select the Trusted Connection check box on the General page in the Database Profile Setup dialog box.

Application Type the following in code:
SQLCA.DBParm="TrustedConnection=1"

----------------------------------

regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top