Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old March 5th, 2004, 09:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
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
  #12 (permalink)  
Old March 9th, 2004, 08:27 AM
Authorized User
 
Join Date: Sep 2003
Location: London, , United Kingdom.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.