Solved

Build ADO Connection String Problem

Posted on 2003-11-07
6
356 Views
Last Modified: 2013-11-23
When I try to create an ADO connection string by clicking on the "Build" button nothing happens.  I get no dialog box or anything.  Currently I am having coworkers build the connection string on their computers and then emailing it to me.  If I paste their string into the Connection String edit box it works fine.

Any ideas of why my Build button won't work?

Thanks,
Pet
0
Comment
Question by:PetMime
  • 3
  • 3
6 Comments
 
LVL 3

Accepted Solution

by:
ThoseBug earned 125 total points
ID: 9718473
try this   //this is just un example..hope this help
procedure TForm1.Button1Click(Sender: TObject);
    var
    STRConn,ServerName, UserName, Password, databasename : String;
    begin
    ServerName := InputBox('Input server name','Server Name','MyServer');
    UserName    :=  InputBox('Input User Name','User Name','sa');
    Password    :=  InputBox('Input Password','Password','myPassword');
    databasename :=  InputBox('Input Database','Database','myDatabase');

    STRConn :='Provider=SQLOLEDB.1; Password='+ Password+';Persist Security Info=True;User ID='+ Username +
              ' ; Initial Catalog='+ DataBaseName +';Data Source='+ServerName;
    With ADOMain do
    begin
    Connected := False;
    ConnectionString := STRConn;
    Connected := True;

    if connected then showmessage('the connection was succesfull');


    end;

end;
0
 
LVL 3

Expert Comment

by:ThoseBug
ID: 9718485
i was thinking..may be you are not in the same domain, or if your server have user may be you donthave permissions...try with the sa user...(if is SQL)
0
 

Author Comment

by:PetMime
ID: 9718597
Thanks for the response.  I'll give your code a try tomorrow.  

As far as me not being on the same domain or having permission goes, if that were the case would I be able to access the database when someone else creates the connection string for me?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:PetMime
ID: 9722557
Thanks ThoseBug.  Your procedure worked great for creating a connection string.  I can use this to create my connection now instead of having a coworker do it.

Any idea, though, of why that button doesn't work?  It just seems strange...
0
 
LVL 3

Expert Comment

by:ThoseBug
ID: 9727709
sorry..i was bussy...if i can see your code behind your button may be try to explain why..

regards.
0
 

Author Comment

by:PetMime
ID: 9731411
I think you misunderstood what I was asking...

The button I made (which you helped me with) works fine.  I was simply wondering why the "Build" button in the ADO Connection String Dialog box isn't working.  When I click it nothing happens.  I get no dialog box, no hourglass, nothing.  It's like I've clicked an inactive button.  I don't have any code bedind it since it's part of Delphi.  
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
code issue 8 177
Magic Software info 18 142
How to save the image in the .cds File ClientDataSet? 1 28
Way to create an iPhone app for my customers 8 38
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 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