Solved

Build ADO Connection String Problem

Posted on 2003-11-07
6
353 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

13 Experts available now in Live!

Get 1:1 Help Now