Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 26th, 2003, 10:01 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
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:

Code:
Dim strConnection As String = "Data Source=127.0.0.1,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:

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

Code:
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 ...
Closed Thread


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
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



All times are GMT -4. The time now is 12:10 AM.


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