Link to home
Start Free TrialLog in
Avatar of LearnITvn
LearnITvn

asked on

HOw do connect Sql Server 2000 from client (VB.NET

i HAVE 2 PC(LAN, server 2003)
pc1-SQL2000 SERVER, net framework 1.1
pc2-ms Visual Studio .NET

      on PC2, I MAKE PROGRAME get data in sqlServer
      run ok, connect,make data OK

but can not run it on pc1 (and any PC on LAN),"error sqlconnection1.open()"
(copy ,MyApp.exe & dataset1.vb.dll from pc2 to pc1 and RUn here)


ConnectionString = "data source=POWER;initial catalog=Accountant;password=123456;persist security info=True;user id=UserAcc;packet size=4096"

Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

This is a tri-plicate post. Please do not post the same question more then one as most of the experts are reading all the VB/.Net topics.

Is your PC1 name is POWER?

Do you have firewalls?
Avatar of DotNetLover_Baan
DotNetLover_Baan

Hi there..
did you get my email ?...

well here is one more thing that you can do... Follow these steps..
-> In ur desktop create a blank text file. Name it as "MyFile.udl" ... not "MyFile.txt"
-> Double click on it, a connection wizard will open.
-> Go to the 'Provider' tab. Select data provider (in your case select OleDbProvider for Sql Server). Cleck next.
-> select the server name from the drop down. You may use Windows Authentication  or  ur ID/Pwd. Make sure you check allow saveing password, to include the password in the connection string.
-> Test connection if it is alright. Click ok.
-> Now open the file in notepad. You will see the connection string.

If you are using System.Data.SqlClient, you don't have to include the "Provider=SQLOLEDB;".
Make sure you have setup the account for the username/pwd you have given, in the sql server with proper access level.

-Baan
Avatar of LearnITvn

ASKER

Thanks Baan
i fix successful
ASKER CERTIFIED SOLUTION
Avatar of ahmadfuwad
ahmadfuwad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial