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?