Friday, February 24, 2012

Connection string OLEDB - SqlServer

I need to conect my software from a remote client to a server, my
standard connection:

Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;Password=;Initial Catalog=MyDb;Data
Source=192.168.0.100;Network=DBMSSOCN;

and

Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;Password=;Initial Catalog=MyDb;Data
Source=192.168.0.100;Network=DBNMPNTW;

make a error connection,
i have tryed with ODBC connection and its OK only in Named Piped.

Can any one help me write the right connection string?

thanks
rmrmartin (rmartin@.freemail.it) writes:
> I need to conect my software from a remote client to a server, my
> standard connection:
> Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;Password=;Initial Catalog=MyDb;Data
> Source=192.168.0.100;Network=DBMSSOCN;
> and
> Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;Password=;Initial Catalog=MyDb;Data
> Source=192.168.0.100;Network=DBNMPNTW;
> make a error connection,
> i have tryed with ODBC connection and its OK only in Named Piped.
> Can any one help me write the right connection string?

Maybe. If you help us to help you. If you get any error message, please
post it. It would also help if you shared information about your network.

You talk about named pipes, but in the connection string you have an
IP address. I'm not good a networking, but it does not sound like a
good thing to me. In any case, I believe it is better to not specify
the network library at all, but control that from the Client Network
Utility.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"rmartin" <rmartin@.freemail.it> wrote in message
news:d7999283.0501261007.201e7769@.posting.google.c om...
>I need to conect my software from a remote client to a server, my
> standard connection:
> Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;Password=;Initial Catalog=MyDb;Data
> Source=192.168.0.100;Network=DBMSSOCN;
> and
> Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;Password=;Initial Catalog=MyDb;Data
> Source=192.168.0.100;Network=DBNMPNTW;
> make a error connection,
> i have tryed with ODBC connection and its OK only in Named Piped.
> Can any one help me write the right connection string?
> thanks
> rm

In addition to Erland's comments, you might find the sample connection
strings here useful:

http://www.able-consulting.com/ADO_Conn.htm

Simon

No comments:

Post a Comment