Solved

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

Posted on 2004-08-27
4
732 Views
Last Modified: 2012-05-05
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"

0
Comment
Question by:LearnITvn
4 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 11920957
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?
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11921532
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
0
 

Author Comment

by:LearnITvn
ID: 11928019
Thanks Baan
i fix successful
0
 
LVL 2

Accepted Solution

by:
ahmadfuwad earned 125 total points
ID: 12083457

Imports System.Data.SqlClient

Public cn As New SqlConnection
cn.ConnectionString = "Server=eteam04;Database=Test;user id=sa;password=password"
cn.Open()
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now