Groups | Blog | Home
all groups > vb.net data > october 2005 >

vb.net data : msSQL Connectionstring


Online
10/23/2005 8:53:23 PM
I have a VB6 applikation that is connecting to av msSql database. I am using
a ODBC connecion. The database is on a remote server.

Now I try to build a connectionstring to the same database in dotNet. I
prefer not to use ODBC. Can anyone help me with av example of a correct
connectionstring? I know the IP-address, username and password.

Thanks

OddA


S.M. Altaf [MVP]
10/23/2005 10:36:03 PM
OddA,

Use the SQLClient namespace. Here's a quickstart tutorial for you:

http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/adoplusoverview=
..aspx

and here's a connection string:

"Data Source=3DXXX.XXX.XXX.XXX,1433;Network Library=3DDBMSSOCN;Initial =
Catalog=3Dpubs;User ID=3Dsa;Password=3Dabcdefg;"

HTH,
Altaf[MVP]



-------------------------------------------------------------------------=
-------

All that glitters has a high refractive index.=20
www.mendhak.com=20
[quoted text, click to view]
I have a VB6 applikation that is connecting to av msSql database. I am =
using=20
a ODBC connecion. The database is on a remote server.

Now I try to build a connectionstring to the same database in dotNet. =
I=20
prefer not to use ODBC. Can anyone help me with av example of a =
correct=20
connectionstring? I know the IP-address, username and password.

Thanks

m.posseth
10/24/2005 7:34:16 PM

just as easy as this :-)

Private strMvarConnect As String =
"server=192.168.1.2;database=web_dummydatabase;uid=dummyuser;pwd=dummypass;"

regards

Michel Posseth [MCP]

[quoted text, click to view]

William (Bill) Vaughn
10/28/2005 12:09:32 PM
Is the remote server visible to the WWW? If so, you might have a security
issue. I suggest opening a VPN connection to it.And I would never permit SA
access from the web--why people use that as an example I'll never
know--unless they're trying to get you to expose the SA account. You'll also
need to determine the TCP port(s) that it's using. While these might be
1433/1434 your server instance might be using other ports and your firewall
might block access to these ports. Make doubly sure that the SA account has
a strong password--not a bad idea for the other accounts too. I would also
ensure that the server is configured for mixed-mode security--setup does not
default to this mode.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________


[quoted text, click to view]

Tamas Nyilanszky
10/30/2005 12:00:00 AM
i prefer to link connectionstring requests to the following site:

http://www.connectionstrings.com/

no, its not a fake, it exists and works just fine. just replace the
string with your access data and go for it.


[quoted text, click to view]
AddThis Social Bookmark Button