Skip to Content

powerbuilder connection

i am using PB11.5 build 3050

my question is about datasources for connecting to a database. I have been told if I put all my information in the connectstring that I don't need to define a datasource. It seems with powerbuilder I need my datasource.

Currently this is what I have to connect:

I have a datasource set up named MAXTEST

[Profile MAXTEST]

DBMS=ODBC

Database=MAXTEST

UserId=

DatabasePassword=

LogId=

LogPassword=

ServerName=

DBParm=ConnectString='DSN=MAXTEST;UID=user;PWD=pwd'

Lock=

Prompt=FALSE

AutoCommit=FALSE

I have tried this using this:

*NO datasource named MAXTEST_CAROL

[Profile MAXTEST_CAROL]

DBMS=

Database=

UserId=

DatabasePassword=

LogId=

LogPassword=

ServerName=

DBParm="ConnectString='ODBC;Driver={SQL Server};ServerName=CS-SQL-04;Database=MAXTEST;UID=user;PWD=pwd"

Lock=

Prompt=FALSE

AutoCommit=FALSE

when I use this i get a dialog box to choose my datasource.

Is it powerbuilder that requires the datasource or am I doing something incorrect?

hopefully this is enough information to help me or point me in the right direction.

Thanks.

CarolD

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2013 at 04:12 AM

    Have a look at this thread: http://scn.sap.com/thread/3382586

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In your two original example above. You are not specifying the DBMS one example. If you specify ODBC and the connection fail you will indeed get a second chance dialogue box.

      Anyway I just thought the answer was in that thread.

      I would have thought that you either use ODBC and refer to the DNS in the dbparm connect string

      or use a different driver like OLE and provide the additional parameters in dbparm and logid/password.

      (example from the mentioned thread)

      SQLCA.DBMS="OLEDB"

      SQLCA.LogId="sa"

      SQLCA.LogPassword="sasa"

      SQLCA.DBPARM="PROVIDER='SQLNCLI10',DATASOURCE='COMPUTERNAME',DelimitIdentifier='Yes',PROVIDERSTRING='database=MyDatabse'"

      I also note that the examples appear like an ini file. You are connecting from your development environment OK? If you are, go to the properties of the database profile and look at the Preview tab. You can copy the entire syntax (minus password) from here and paste it in you PB script....

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.