Solved

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

Posted on 2004-08-27
4
735 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 70

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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