Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2006, 08:34 AM
Registered User
 
Join Date: Aug 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server Access ID & Password

In chapter 16 we learn about connecting to a SQL server.
How do I determine what my User ID and Password for SQL server are?

It installed with my Visual Studio 2005 Professional and I do not recall being ask to enter a user ID and Password for the SQL instillation.
 
Old September 9th, 2006, 06:48 PM
Registered User
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SQLServer was installed along with VS2005? Are you sure? Which version of VS2005 are you running?

To see if you have SQLServer installed, click on Start/Programs/Microsoft SQL Server 2005/SQL Server Management Studio -- do you have this? Does it work?

I'm just curious, because I haven't heard of it being part of the VS2005 installation. I've always seen it installed separately.

irish_songbird
 
Old September 13th, 2006, 01:19 PM
Registered User
 
Join Date: Aug 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In answer to irish_songbird's question, I do not know at what point SQL server was installed on my machine. I remember reading something that said that the Express version, which I have, comes with Visual Studio 2005 .NET. That is why I mentioned it. Refer to the reference at the top of page 494.

Now; Let me rephrase my question, how do I deterring what my SQL User ID and Password are?
I do not recall ever being asked to provide them.

On page 509 Try It Out DataSet Example

In #5: I need to provide the machine where SQL server is running, this I know.
       I need to provide the User Id for the SQL server access, which I do not know.
       I need to provide the Password for the SQL server access, which I do not know.

How can I determine what these values are or do I need to un-install SQL server and then re-install it and record these parameters?
 
Old September 13th, 2006, 04:11 PM
Registered User
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can't help you specifically with SQLServer 2005 Express, I am running SQLServer2005, but here are some ideas you can try.

If you installed SQLServer2005Express under your own account, try doing the example w/o a username and password. If your SQLServer is set up to use Windows security, and you installed it, it should let you connect automatically.

If your SQLServer is set up to use SQLServer security, you may need to open up SQLServer and set up an account.

Another way to figure out the connection string is to use the wizard in VS2005 to set up a data source in your project, and then go look at the connection string created for that source. You have to know where the mdf file that contains the data resides on your computer.

According to another VB book I have, in VS2005:

Go to Data --> Show Data Sources to display the Data Sources window.

Click on the Add New Data Source button (icon).

Select Database as the data source type on the next screen and click <Next>.

When the "choose your data connection" dialog appears, I think you can go look for the .mdf file for your database and select it, unless it's already displayed.

Then you should be able to save (and hopefully test) your connection string.

If you can connect this way, look in the app.config file and find the connection string (look for "connectionString"), and then paste that into your code and try it.

It's sneaky, but it usually works.

irish_songbird
 
Old November 7th, 2006, 05:34 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know much about the Express Edition as it was installed with VS2k5 but i use the Dev edition.
but i'll try to help.
1. Check if u have Microsoft Sql Server 2005>SQL Server Management Studio shortcut in your programs menu
2. Open it and then click view>Registered Server
Here u 'll find all the Sql server instances installed on your system(Search for Express one)
3. if there is no play icon with the server then right click on it and select start. and confirm the next dialog box.
4. again right click on the icon Connect>object explorer
now u'll see objects of your server in left hand side on the pane
5. select security>login and then either select sa or right click and select new login
new login goto step 7
6. now u'll see login properties of sa change the password of the user and click on status in the left pane and select enabled under login option click ok.
thats it now u can use it for Visual studio with username sa and <password> u mentioned. skip step 7
7. add name, select sql server authentication,and give it a password,if u want to be an admin then click server roles in left and click on appropriate option and click ok.


Also i forgot by default Sql server authentication mode is disabled so to enable it
Click on the Server name in object explorer in the left and then right click properties then click security and enable Sql server and windows authentication mode

i hope this helps!!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report & VB6 & SQL Server wlho VB How-To 2 June 5th, 2013 01:58 AM
Memorise ODBC Username & Password in Access DB Roly Reefer Access VBA 23 January 20th, 2012 02:32 AM
Remember my id & password tanzi Servlets 1 May 8th, 2008 10:20 PM
Master pages &server control ID - asp.net 2.0 tech user C# 2005 1 August 3rd, 2006 04:31 AM
Autogenerated id in SQL Server 2000 evelynlsy SQL Server 2000 3 April 3rd, 2005 03:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.