Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 3rd, 2008, 01:27 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default Connection string

Hi Does any one know how to change the conn string from attach mode to a normal one?
I am using the online diary application which the original code has the attach method on the code in web config and under app-code folder.
i did change the connection string in the web config that is ok now how is the connection string in the app-code folder within the class gonna be, it cant be the same cos i did try and it gives me an sql error :Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.:
which i have enabled .
any suggestions ?

thanks

bx
__________________
bx
 
Old August 3rd, 2008, 01:31 PM
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://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

and here:

http://www.connectionstrings.com/

Hope that helps,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old August 3rd, 2008, 01:45 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

Hi Imar thanks for the replay the connection in the web confiis working the one inside the lasses does not.
This is the conn in the web config:<add name="DiaryDBConnectionString" connectionString="Data Source=SQLEXPRESS;Initial Catalog=DiaryDB.mdf;User ID=xxxxxx; Password=xxxxxxx"
   providerName="System.Data.SqlClient" />
how do i change the conn inside the class? can it be the same

Public Class DiaryEvent
    Const conString As String = "Data Source=SQLEXPRESS;Initial Catalog=DiaryDB.mdf;User ID=xxxxx; Password=xxxxxxxx"


bx
 
Old August 3rd, 2008, 02:11 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

there is some thing else, i dont want to use the attach method so i restored the database in a sql server and delete the app-data folder from the directory, but every time i rebuild the application the app-data folder is created,there is a bit of code that does that and i cant find it,

bx
 
Old August 3rd, 2008, 02:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The code doesn't do it; the ASP.NET run-time does this.

Take a look here to learn how to reconfigure ASP.NET (linked to from the first article I posted in this thread): http://weblogs.asp.net/scottgu/archi...25/423703.aspx

BTW, it should be .\SqlExpress if you're working with the expression version.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection string MunishBhatia ASP.NET 2.0 Professional 4 May 16th, 2007 05:50 AM
Connection String jmss66 Oracle 4 August 8th, 2006 03:19 AM
Connection String slgknjn VB Databases Basics 2 February 26th, 2005 03:14 AM
Connection String fs22 Classic ASP Databases 3 August 30th, 2004 01:25 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.