1. yogesh Kumar
  2. PowerBuilder
  3. Monday, 20 September 2021 07:06 AM UTC

Hi All,

When i do the install application in user machine then i need to configure DSN manually (Create DSN, Configure). 

I need to do id must be automatic DSN creation. I am using the INNO Setup for creation of MSI.

Please help me !!!

Thanks,

Yogesh

Marco Meoni Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 10:15 AM UTC
  2. PowerBuilder
  3. # 1

Hello,
DSN settings are stored in the Windows registry under HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBCINST.INI.
Depending on what DB type you use, have the ODBC driver installed and check in the Registry.

For example, for ASA 17 I am just seeing you would need something like this at application startup:

RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBCINST.INI\SQL Anywhere 17", "Driver", RegString!, GetCurrentDirectory() + "dbodbc17.dll")
RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBCINST.INI\SQL Anywhere 17", "Setup", RegString!, GetCurrentDirectory() + "dbodbc17.dll")
RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers", "SQL Anywhere 17", RegString!, "Installed")

Then, specify the proper Connection String to connect to the remote server, for example:

sqlca.DBParm = "ConnectString='UID=dba;PWD=sql;servername=servername;Driver={SQL Anywhere 17};Links=tcpip(host=192.168.1.116)'"

If you want to keep machine clean, use RegistryDelete() at application closure.

Best,
.m

Comment
There are no comments made yet.
yogesh Kumar Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 09:34 AM UTC
  2. PowerBuilder
  3. # 2

We are also using SQLCA.DBParm = "ConnectString='DSN=TestDB;UID=yogesh;PWD=welcome@123',DelimitIdentifier='No'"

We will need to create the DSN "TestDB". This DSN is required for all machine where we are installing the setup then how to overcome this problem?

Comment
There are no comments made yet.
yogesh Kumar Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 09:29 AM UTC
  2. PowerBuilder
  3. # 3

Thanks Miguel,

I am using sql database. Please provide the the code for it.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 09:26 AM UTC
  2. PowerBuilder
  3. # 4

Hi,

Depending on which database and client you are using, it might not be needed to create a DSN on every machine. It might be possible to specify all the information in sqlca.dbparm

So the question is: Which database and client are you using?

regards.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.