INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Connecting to sqlserver 2000 from windows 7 64 bit OS.

Connecting to sqlserver 2000 from windows 7 64 bit OS.

(OP)
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.

RE: Connecting to sqlserver 2000 from windows 7 64 bit OS.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close