Wrox Programmer Forums
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics 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 26th, 2003, 10:01 PM
Registered User
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection String Weirdness

I have the following in an .aspx page, which works perfectly:

Dim strConnection As String = "Data Source=,1433;" & _
"Network Library=DBMSSOCN;Initial Catalog=Northwind;" & _
"User ID=userid;Password=seekrit;"
In the book Beginning ASP.Net Databases using VB.Net, page 91, it gives an example of moving this connection string to /web.config. I've modified the example code to read:

value="Data Source=,1433;Network Library=DBMSSOCN;Initial Catalog=Northwind;User ID=userid;Password=seekrit;" />
I've made the following change to my .aspx script:

Dim strConnection As String = ConfigurationSettings.AppSettings("NWind")
However, when I execute the script, I get the "SQL Server does not exist or access denied" message.

My scripts are in /examples/ch03, and again, web.config is in /. Does this matter? The book seems to indicate that it does not.

Anyone see what I've done wrong or where I may be missing it? I'm stumped ...

Similar Threads
Thread Thread Starter Forum Replies Last Post
DDE Connection weirdness jjk2 Beginning VB 6 0 January 5th, 2008 06:09 AM
Connection String jmss66 Oracle 4 August 8th, 2006 03:19 AM
connection string nalla ASP.NET 1.0 and 1.1 Professional 2 January 23rd, 2006 04:03 AM
Connection String aadz5 JSP Basics 1 January 24th, 2005 04:36 AM
Connection String Help. diamond2165 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 7th, 2003 06:09 AM

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