Solved

Getting extended BDE Driver Info

Posted on 2001-06-27
23
469 Views
Last Modified: 2013-11-23
Hi People.

I'm trying to write a BDE Admin substitute (which does a lot more than the BDE Admin does).  I'm about 80% through it, and I've decided to try to make the program actually create aliases.

If you open the BDE Administrator and select any alias, you will notice that a few of the definitions have multiple options (for Paradox you can change ENABLE BCD to true or false).  Oracle, Interbase, DB2 etc have even more definitions with multiple options.

What I would like to know is, how can I tell what these options are?  Where are they read from, or what defines them.

Another definition with Oracle is SERVER NAME which is a combo containing a list of just Oracle libraries.  How does the BDE know about these?

I know 300 points isn't much for a question like this, but I'll offer another 300 points to the person who can point me in the right direction and maybe getting me started.  I dont want it all written for me, but an example would be nice :)

Thanks heaps,

Stuart.
0
Comment
Question by:SJohnson
  • 9
  • 7
  • 3
  • +3
23 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6233969
see the getaliasparams-method of the bde-unit

searching sample now
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6233971
sorry i meant from the tsession object :-)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 150 total points
ID: 6233980
a sample found, about modifying


unit mod_ali_u;

interface

uses
 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 DBTables, StdCtrls;

type
 TForm1 = class(TForm)
   ListBox1: TListBox;
   BT_Modify: TButton;
   Button2: TButton;
   Edit1: TEdit;
   Session1: TSession;
   ComboBox1: TComboBox;
   procedure BT_ModifyClick(Sender: TObject);
   procedure FormCreate(Sender: TObject);
   procedure ComboBox1Change(Sender: TObject);
   procedure ListBox1Click(Sender: TObject);
   procedure Button2Click(Sender: TObject);
 private
   { Private-Deklarationen }
 public
   { Public-Deklarationen }
 end;

var
 Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.BT_ModifyClick(Sender: TObject);
begin
 If ComboBox1.Text <> '' then  //Alias selected
 begin
   session1.ModifyAlias(ComboBox1.Text,listbox1.items); //Perform changes
   session1.saveconfigfile;                             //Saveconfig
 end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 ComboBox1.text := '';
 session1.ConfigMode := [cfmPersistent];    //Configuration only configfile
 Session1.GetAliasNames(ComboBox1.Items);   // Get all Aliases
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
 session1.GetAliasParams(ComboBox1.Text,listbox1.items);  //Get params from selected Alais
end;

procedure TForm1.ListBox1Click(Sender: TObject);
begin
 edit1.text := listbox1.Items.Values[listbox1.Items.Names[ListBox1.ItemIndex]]; //Edit selected Param
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 listbox1.Items.Values[listbox1.Items.Names[ListBox1.ItemIndex]] := edit1.text;  //Update List with
editentry
end;

end.

instead of modifyalias you can also use createalias

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6233987
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6233999
Hi Meikl,

You wouldn't have a DFM you could post too (call me lazy <G>).

Stu
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6234084
at home i have,
currently at work i've no delphi installed,
thats why i work much from head the last months.

i will provide you the dfm this evening,
thats in  ~10 hours from now

meikl ;-)
0
 
LVL 22

Expert Comment

by:mnasman
ID: 6234192
Hello

  Here's some links will help you
http://delphi.about.com/compute/delphi/cs/dbbde/index.htm
you will find some free uitiles with source, may help you
http://www.torry.net/tools_dbmanagers.htm

Mohammed

0
 
LVL 1

Author Comment

by:SJohnson
ID: 6236274
Hi Meikl,

I put together the code you sent this morning and it works fine, however, it isn't doing what I was looking for.

Using your example, say we use an Oracle database.  One of the returned properties for that database will be SQLPASSTHRU MODE.  I need to know what options are available for this property (in this case it is NOT SHARED, SHARED AUTOCOMMIT or SHARED NOAUTOCOMMIT).

Surely the BDE Administrator isn't written with hard-coded rules defining what each possible properties values could be?

mnasman: I had a look through the links you posted and Torry's only had a few projects with source but none of them where BDE related (ADO/DAO only).  The Delphi-About site was good too, but it only delt with basic alias creation (which I can do already).

Thanks for the input so far.  Keep it coming if possible.

Stu.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6237514
i will take a look to this selectable
bde-alias properties,
but i guess the bde-api didn't have a method to provide this, but maybe

guessing you do not need the dfm-file furthermore
(i've forget this, sorry)

meikl ;-)
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6237710
Hi Meikl,

Sorry, I forgot to let you know that :)

I have a feeling all this can be acheived using the BDE APIs (dbiXXXXX calls).  I'm not sure how they work though which is why I am asking here.  Ctrl-Click on this in Delphi, then check Group out: dbiGetSysVersionInfo

Cheers,

Stu.
0
 
LVL 22

Expert Comment

by:mnasman
ID: 6248057
Hello Stuart

  If you want to list the oracle servers that installed in the computer, oracle store them in file called "tnsnames.ora", if you open it with notepad u will see every server and it's configuration, i have sql navigator 4, and it list the oracle servers in my machine, but when i change the file tnsnames.ora, sql nav couldn't view the servers, so you have to look at this file


Mohammed
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:SJohnson
ID: 6248593
Hi Mohammed,

This is a great bit of info!  Thank you very much.  I'll have a look at that when I get into work tomorrow morning.

Cheers,

Stu.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6291752
Hi Mohammed,

Sorry it's taken a while for me to reply.  I've been flat out with other jobs.  I just checked out the TNSNAMES.ORA file, and it does contain everything you said.  This is excellent!

I still need to find out the rest of the information.  I'm sort of stuck without it :(

Thanks very much for the help so far!

Stu.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6307135
Hi People,

I found this: http://www.borland.com/devsupport/bde/bdeapiex/index.html

It goes into details on how to do what I wanted to do, but to be honest, it all seems like a bit too much hard work :)

I dont think I'll go to the sort of lengths that I was planning on going with this app - unless someone has some good working source they could share which shows off some of the examples in this document?

Cheers,

Stuart.
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 6932047
Hopefully you've already been helped with this question, but thought you'd appreciate knowing this.  It would be great if you could bring this question to a conclusion, awarding the experts above who helped you with points or a comment to them on your status today.

WindowsUpdate has new updates for .NET users; Details follow - Microsoft .NET Framework
The .NET Framework is a new feature of Windows. Applications built using the .NET Framework are more reliable and secure. You need to install the .NET Framework only if you have software that requires it.

For more information about the .NET Framework, see http://www.microsoft.com/net. (This site is in English.)

System Requirements
The .NET Framework can be installed on the following operating systems:
Windows 98
Windows 98 Second Edition (SE)
Windows Millennium Edition (Windows Me)
Windows NT 4.0® (Workstation or Server) with Service Pack 6.0a
Windows 2000 with the latest service pack installed (Professional, Server, Datacenter Server, or Advanced Server)
Windows XP (Home Edition and Professional)
You must be running Internet Explorer version 5.01 or later for all installations of the .NET Framework.

To install the .NET Framework, your computer must meet or exceed the following software and hardware requirements:

Software requirements for server operating systems:
MDAC 2.6
Hardware requirements:
For computers running only a .NET Framework application, Pentium 90 mHz CPU with 32 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
For server operating systems, Pentium 133 mHz CPU with 128 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
Recomended software:
MDAC 2.7 is recommended.
Recommended hardware: For computers running only a .NET Framework application, Pentium 90 MHz CPU with 96 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
For server operating systems, Pentium 133 MHz CPU with 256 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.

How to use -> Restart your computer to complete the installation. No other action is required to run .NET Framework applications. If you are developing applications using the .NET Framework, you can use the command-line compilers or you can use a development environment, such as Visual Studio .NET, that supports using the .NET Framework.

How to uninstall
To uninstall the .NET Framework: Click Start, point to Settings, and then click Control Panel (In Windows XP, click Start and then click Control Panel.).
Click Add/Remove Programs.
Click Microsoft .NET Framework (English) v1.0.3705 and then click Change/Remove.
More here  http://www.microsoft.com/net/

The .NET topic is being considered for addition to our All Topics link soon, so this may interest you as well:
http://www.experts-exchange.com/newtopics/Q.20276589.html

EXPERTS POINTS are waiting to be claimed here:  http://www.experts-exchange.com/commspt/Q.20277028.html

":0)
Asta


0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6932558
Asta,

This account was closed because it was deemed a second account, so this question will never be closed unless it was done by a moderator.

Stu
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6934250
Hi, Stu.  astaec sent me this link, please tell me how you would like this handled, and I will take the actions for you.
Thanks,
Moondancer - EE Moderator
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6934328
Hi Moondancer,

ComTech looked after the problem for me (see http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20148878).  Thanks heaps!

Stu
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6934347
OK.  Here we go.  Sorry for the delays, but my account was deleted :)

As this question was never really solved, I would like to know who would like the points.  It's been so long since the question was asked, I feel mean deleting it.  I'm more than happy to split the points if that's whats requested.  How it's done is up to you guys.

Thanks for you help with this and other questions,

Stu
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6934675
splitting points is ok for me
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6934964
Good news all the way around.  It's been a great day and happy ComTech fixed the problems for you.

To facilitate this point split award, Stu, I have refunded 150 points to you for this question by changing this question value to half (150 points).  You may now choose one expert above to flow points within this question and then please post a new question in this topic area for the other expert.

Title:  Points for __expertname__
Comments, just paste this question link.

The other expert will then comment and you then accept that portion to award the other increment of points.

Let me know if more is needed.

:)
Moondancer - EE Moderator
0
 
LVL 1

Author Comment

by:SJohnson
ID: 6935501
Hi Meikl,

Thanks for you help with this question.  Thanks for understanding about the delays as well.

Mohammad,

There will be another question for you with your name attached.  Thank you as well.

Moondancer,

Thanks for you help getting this question resolved and my account reactivated.  I appreciate your help.

All the best folks,

Stu
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6935538
Happy I could help. :)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now