AllExperts > Delphi 
Search      
Delphi
Volunteer
Answers to thousands of questions
 Home · More Delphi Questions · Answer Library  · Encyclopedia ·
More Delphi Answers
Question Library

Ask a question about Delphi
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Randy Sill
Expertise
Turbo Pascal and Delphi developer since 1986. Strengths - UI, Windows API, Database, SQL, Internet, Threading, NT Services.

Experience
Turbo Pascal and Delphi developer since 1986.

Education/Credentials
Delphi 5 Certification, Borland

Awards and Honors
2005 Indiana IT/Software Million Dollar Award, Key Technical Contributor

 
   

You are here:  Experts > Computing/Technology > Delphi Programming > Delphi > Trouble making ODBC connection

Delphi - Trouble making ODBC connection


Expert: Randy Sill - 10/8/2009

Question
Hello,

I am developing application using C++Builder. I use the TQuery object to execute queries to a local SQL Server 2000.

Recently I executed an SQL statement (which always succeeded before today) and I got error message like this:

Invalid parameter .

There is a dot in the error message. The SQL statement has no parameter or dot character.

Then I tried to make a new ODBC connection to the local SQL Server. On the first step, there is a server drop down list. And there is a dot listed in the drop down list. The computer name is not listed.

But strange, when I connect the computer to LAN, the computer name and (local) appears in the server drop down list.

What do you think is the problem?

Thank you,
Frans Indroyono

Answer
The single Dot often means "This PC".  If I were to have a SQL server instance, I could use ".\InstName" as the server name just as easily as "MyPCName\InstName".  If you are using the default SQL setup without instance then Server can be just "." and your connection will work fine.  I often do that in a multi developer environment so that we're all pointing to our local system for database.  Invalid parameter can mean a lot of things, so not sure what the cause of that error is.  Have you tried the same command in Enterprise Manager query window?

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.