1. Larry Langford
  2. PowerBuilder
  3. Thursday, 12 March 2020 20:45 PM UTC

Where does the list of ODBC Data Sources (presented in the Database Painter) come from?
I presumed it references the Registry (HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources),
but the list I see isn't consistent with the Registry entries.

When added an ODBC connection, I manually entered the DSN (it wasn't in the list), and I'm able to connect.
However, I need to export the SQL syntax of a table, but the database where it lives isn't one of the choices in the list.

Larry Langford Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 13:20 PM UTC
  2. PowerBuilder
  3. # 1

I'm convinced the list doesn't come from the Registry.  I took John Faus's advice and searched the Registry, and didn't find a list that matches what I see in the database painter.  I struck out with the C:\Windows\SysWOW64 possibility - there isn't an ODBC.ini or an ODBCINST.ini.  I did a search anywhere on my C: drive for an ODBC.INI, but no luck.  The ODBC Admin configuration tool shows the complete list of DSN's - including the one particular database I need but isn't in the database painter list.

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 12:56 PM UTC
  2. PowerBuilder
  3. # 2

It is probably a combination of the local machine and current user ODBC keys from the registry.

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 06:25 AM UTC
  2. PowerBuilder
  3. # 3

Hi Larry,

you may try to use Sysinternals Process Monitor to scan where Powerbuilder searches the OBDC data sources. Maybe you also see here where PowerBuilder finds the datasource you are looking for.

Do you see the DataSource if you use the ODBC Administrator? What type of DataSource is it? (user, system, file?)

Some more places to look:

C:\Windows\SysWOW64\ODBC Drivers\ODBC Data Sources.ini

C:\Windows\ODBC.INI

 

HTH,

René

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 17 March 2020 21:56 PM UTC
  2. PowerBuilder
  3. # 4

Hi, Larry -

Have you tried performing a search from Regedit, say on one of the more unique/uncommon data source names so as to try and minimize the number of hits?

Regards, John

Comment
There are no comments made yet.
Larry Langford Accepted Answer Pending Moderation
  1. Tuesday, 17 March 2020 19:37 PM UTC
  2. PowerBuilder
  3. # 5

The Registry entry HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sybase\PowerBuilder\17.0\Vendors contains a list of the different database types (see attached screenshot), not the indisvidual data sources.

Attachments (1)
Comment
  1. Roland Smith
  2. Tuesday, 17 March 2020 20:57 PM UTC
How do you get that 'Data Sources' response window to come up?



What database type are the sources?
  1. Helpful
  1. Larry Langford
  2. Tuesday, 17 March 2020 21:40 PM UTC
In the database painter, if you right click a table name, then select Export Syntax. Next select ODBC, then a dialogue box shows the list of available data sources.
  1. Helpful
There are no comments made yet.
Larry Langford Accepted Answer Pending Moderation
  1. Friday, 13 March 2020 13:22 PM UTC
  2. PowerBuilder
  3. # 6

Thanks everyone!
I'm familiar with the different Registry locations where DSN's might be listed:

HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\ODBC Data Sources

HKEY_CURRENT_USER\Software\Sybase\PowerBuilder\17.0\DatabaseProfiles\PowerBuilder

...and I've checked each, but still don't see the list that matches what I see within PowerBuilder (see the attached screen shot).


As mentioned, I'm trying to export the SQL syntax for the CREATE for a single table so that I can replicate it within a SQL Server database schema.

Attachments (1)
Comment
  1. Roland Smith
  2. Tuesday, 17 March 2020 18:46 PM UTC
We thought you meant a list of database profiles. Try this:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sybase\PowerBuilder\17.0\Vendors
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 13 March 2020 06:37 AM UTC
  2. PowerBuilder
  3. # 7

Hi Larry,

there are different types of ODBC data sources; for users, for machine (system) and in files.

 

File data sources you find in file system.

 

System data sources you may find in registry:

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\ODBC Data Sources

 

User data sources are also in the registry:

HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources

 

HTH,

René

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 13 March 2020 00:43 AM UTC
  2. PowerBuilder
  3. # 8

Here is the location where database profiles are stored:

HKEY_CURRENT_USER\Software\Sybase\PowerBuilder\##.#\DatabaseProfiles\PowerBuilder

Appeon versions of PowerBuilder still use the Sybase key.

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 12 March 2020 23:09 PM UTC
  2. PowerBuilder
  3. # 9

If I understand you correctly:

I think you have the correct location, but they will not be displayed until
   1) there's a Data Source Name created for each database you want displayed, and
   2) you have created a profile for the database.


I do not know how to export an entire database. In the past I have exported the synatx and data of each table in the database, one at a time.


Good Luck!

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.