Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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