Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.1
|
BOOK: Beginning ASP.NET 1.1
This is the forum to discuss the Wrox book Beginning ASP.NET 1.1 with Visual C#.NET 2003 by Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Daniel Maharry; ISBN: 9780764557088
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.1 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 August 13th, 2005, 12:37 PM
Authorized User
 
Join Date: Jun 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8: SQL Server vs. Access Connection

Greetings,

Chapter 8, p. 276, 4th paragraph:
"...If you want to use SQL Server, you can simply replace OleDb with SqlClient in the object names; just change the connection string, and continue working."

All well and good, except that the text is not explicit about what you're supposed to change the connection string *to*...

Figuring out the path for the "Data Source" argument is easy enough, but what about the "Provider" argument? Presumably it's not "Microsoft.Jet.OLEDB.4.0"...

Some help?

 
Old August 14th, 2005, 03:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look here: http://www.connectionstrings.com/

Under SQL Server| SqlConnection you'll find the proper syntax. You shouldn't set the Data Source to a file path (to the .mdf) but to the server's (instance) name.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old August 14th, 2005, 03:37 PM
Authorized User
 
Join Date: Jun 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
Hi there,

Take a look here: http://www.connectionstrings.com/

Under SQL Server| SqlConnection you'll find the proper syntax. You shouldn't set the Data Source to a file path (to the .mdf) but to the server's (instance) name.
Thanks for the reply, I also found this in another Wrox book when I was hanging out at Borders yesterday. But shouldn't the paragraph I cited read as follows?:

"...If you want to use SQL Server, you can simply replace OleDb with SqlClient in the object names; just import the System.Data.SqlClient namespace, change the connection string
to "Server=myservername;Database=mydatabase;Trusted_C onnection=True | False"
 and continue working."
--
'bonehead
-------------------------
"The most likely way for the world to end,
 most experts agree, is by accident.
 That's where we come in.
 We're computer professionals.
 We cause accidents."
 Nathaniel Borenstein, Senior Computer Scientist, IBM

 
Old August 14th, 2005, 03:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, I think so. Your version of it provides more and more accurate detail, which a novice reader really needs....

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Connection - Chapter 9 mdfinch BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 October 23rd, 2007 12:46 AM
MS Access to SQL server connection imaley Access VBA 3 February 16th, 2007 01:59 PM
No connection to sql server, Access and excel Dorenbos BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 22nd, 2004 12:53 AM
Chapter 12 SQL Server Access crazy BOOK: Beginning ASP.NET 1.0 1 September 20th, 2003 08:59 AM





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