Groups | Blog | Home
all groups > sql server connect > september 2003 >

sql server connect : Connection String Restrictions


Kyong Kwak
9/4/2003 12:45:40 PM
Hi,

I want to connect to multiple servers (ms sql server, oracle, ASA, and ASE)
and I plan to use SQLDriverConnect().
Reading over the documentation on MSDN I see that the connection string for
SQLDriverConnect() allows braces (e.g. { } ) for attribute values.. such as
PWD={xxx} -- (though it's written out but not placed in the syntax)

I want to know if I HAD to use the braces to have these characters (
[]{}(),;?*=!@ ) as part of my password?
I've been testing with odbct32.exe and I seem to connect fine when I don't
use the braces..

can someone help? maybe the good people of the sql server team?

thanks!
kyong.

Igor Shekalev
9/5/2003 11:46:52 AM
Hello Kyong,

What error message did you see? I connected successfully to my MS SQL 2000
using next connect string:
"DRIVER={SQL Server};SERVER=TOSHIBA;USER=TestLogin;PWD=123{}"

Next string working fine too:
"DRIVER={SQL Server};SERVER=TOSHIBA;USER=TestLogin;PWD=\"123{}\""

KK> I want to know if I HAD to use the braces to have these characters (
KK> []{}(),;?*=!@ ) as part of my password?
KK> I've been testing with odbct32.exe and I seem to connect fine when I
KK> don't use the braces..

Igor Shekalev, http://www.sqledit.com, SQL editor with ODBC,IDAPI and OCI
support

Kyong Kwak
9/8/2003 8:05:35 AM
It's not that I actually ran in to a problem with the special characters,
it's the documentation of SQLDriverConnect() which concerns me. The
documentation (msdn) states that these ( []{}(),;?*=!@ ) characters
should be avoided due to the parsing grammar..

but yes, I've tried to log in with these special characters and they seem to
work.. now if someone from the microsoft team could shed a little light on
this.. is the documentation for DriverConnect() outdated? if so, when did
the change occur?


thank you!
kyong.


[quoted text, click to view]

AddThis Social Bookmark Button