Archive: MSSQL OLEDB plugin does not check specific character "\" ?


MSSQL OLEDB plugin does not check specific character "\" ?
The situation is that I used MSSQL OLEDB plugin to check if login server is ok.And then I enter the only character "\" in database server name field, it should pop up error message like "SQL server does not exist" or .., but login server succuss ?!

Anyone has idea ?

Thank you.

Best Regards,


Cannot understand your question.
Your call to the SQL_Logon function should return a failure code if the specified server does not exists.
This should be true for "\" also.


Or perhaps it's treating "\" as the default server on the local machine using the credentials of the one running the install. (This is just a guess, though...) :confused:


But it's strange that SQL_Logon function return a success code when I enter "\". I am sure that server doesn't exist
then. why "\" succeed to login server?!:confused: I use osql to test if "\" is valid. Osql will return error code as expected. I use SQL Express 2005 as database. Is it database issue? :confused:


thank you.


Have you tried contacting the plugin's author?


Plugin's author here...
The "\" char seems to be considered as "blank" by the OLEDB driver and then it connects to the local machine.
If you try other applications using oledb (I tried with Crystal Reports) it connects to the local machine as well.
I don't know if this a feature or a bug of the OLEDB driver, but the plugin is interfacing correctly to the driver.
OSQL fails because uses ODBC and not OLEDB.
Regards
Stefano


Port information?
Hello,
I would like to connect to a SQL server instance running on the network. The service is not running on the default port - 1433.

How do I use Logon to connect to the service?
AFAIK, Logon needs the server name, username and password only. Does the plugin assume the service runs on 1433 always?

Please help.
Thank you!


Hi.
I found this example: SqlClient.SqlConnection("Database=THEName;Server=server ip address,winsock tcpip port;Network Library=dbmssocn;User ID=domain\user id;Password=password;Trusted_Connection=False;")

So I suppose you should use:

MSSQL_OLEDB::SQL_Logon<SERVER_NAME,PORT><user><password>

Try to play with it. Also you can try SERVER_NAME:PORT

Thanks T.Slappy!
I had tried both server: port and server,port.
Both did not work :(


Sorry, that worked.
Apologies for not updating the result earlier.
T.Slappy, that had worked :)
I overlooked something in my first run :(