on 08-27-2013 6:41 PM
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
Have a look at this thread: http://scn.sap.com/thread/3382586
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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....
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.