Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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 March 5th, 2004, 09:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey Jamal, try building a fresh connection string using a udl file.

Just create a blank file named "anything.udl" file, double-click it and you'll get a nice dialog box to specify your server, db etc. Just in case you're unsure what to put, here goes step-by-step:
1. click the Provider tab
2. select "Microsoft OLE DB Provider for SQL Server"
3. click "Next" button which takes you to the Connection tab
4. item 1. select your local server from the drop-down, or just type "(local)" in there
5. item 2. choose "Use a specific user name and password", enter the user and password and also check (turn on) the "Allow saving password" checkbox
6. item 3. select your db from the drop-down list
7. hit the "Test Connection" button and see what happens (it should just say "Test connection succeeded")
8. hit OK to close the dialog
9. finally, open the udl file in Notepad and there on the last line you'll see the connection string you've just built. Paste that whole line into your ASP page and try it out.

You now know for sure you've got a good connection string, so if you still get problems it's not your connection string!

hth
Phil
 
Old March 9th, 2004, 08:27 AM
Authorized User
 
Join Date: Sep 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jams30
Default

Hi Phil

Thanks for your help, I followed your steps as below and managed to get the example to work - although I'm not too sure why the example in the book didn't work for me!

The only thing that I had as a problem with was the entering of a username and password, when doing so, I had the following error message 'Test connection failed because of an error in the initializing provider - unspecified error' - so I used the 'use windows NT integrated security' option instead!

Once again, thanks for all your help Phil (and Imar!)

Jamal :)



Quote:
quote:Originally posted by pgtips
 Hey Jamal, try building a fresh connection string using a udl file.

Just create a blank file named "anything.udl" file, double-click it and you'll get a nice dialog box to specify your server, db etc. Just in case you're unsure what to put, here goes step-by-step:
1. click the Provider tab
2. select "Microsoft OLE DB Provider for SQL Server"
3. click "Next" button which takes you to the Connection tab
4. item 1. select your local server from the drop-down, or just type "(local)" in there
5. item 2. choose "Use a specific user name and password", enter the user and password and also check (turn on) the "Allow saving password" checkbox
6. item 3. select your db from the drop-down list
7. hit the "Test Connection" button and see what happens (it should just say "Test connection succeeded")
8. hit OK to close the dialog
9. finally, open the udl file in Notepad and there on the last line you'll see the connection string you've just built. Paste that whole line into your ASP page and try it out.

You now know for sure you've got a good connection string, so if you still get problems it's not your connection string!

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Chapter 12 JamesY BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 July 11th, 2006 03:49 PM
Chapter 12 - $_POST['redirect'] problem cshu BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 4 July 25th, 2005 08:14 PM
Chapter 12 Code Behind Problem locknload7 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 March 30th, 2005 10:34 AM
Problem with Excel VBA Chapter 12 RogerWaters Excel VBA 0 September 22nd, 2003 10:13 AM
Chapter 12 problem Please help rsteph7 Beginning PHP 2 July 16th, 2003 02:02 PM





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